]> git.ipfire.org Git - thirdparty/httpx.git/commit
Sync or Async dispatch (#83)
authorTom Christie <tom@tomchristie.com>
Mon, 10 Jun 2019 11:26:03 +0000 (12:26 +0100)
committerGitHub <noreply@github.com>
Mon, 10 Jun 2019 11:26:03 +0000 (12:26 +0100)
commit0cbf3c75819a176bf2812e72eee4829bf387cc96
tree4f690229b198a8ba18731857a7fe6e3575e230c7
parentba033c549f5c2834e7ebc79739a86d84dad86d62
Sync or Async dispatch (#83)

* Support thread-pooled dispatch

* Add ConcurrencyBackend.run

* Initial work towards support byte-iterators on sync request data

* Test case for byte iterator content

* byte iterator support for RequestData

* Add BaseResponse

* Bridge sync/async data in SyncResponse

* Add BaseClient

* SyncResponse -> Response

* Tweaking type annotation

* Distinct classes for Request, AsyncRequest

* Tweak is_streaming, content in BaseRequest

* Stream handling moves to client

* Handle mediating to AsyncResponse from a standard sync Dispatcher class

* Working on thread-pooled dispatcher

* Support threaded dispatch, inc. streaming requests/responses

* Increase test coverage

* Coverage and tweaks

* Include Accept and User-Agent headers by default
22 files changed:
httpcore/__init__.py
httpcore/api.py
httpcore/auth.py
httpcore/client.py
httpcore/concurrency.py
httpcore/dispatch/connection.py
httpcore/dispatch/connection_pool.py
httpcore/dispatch/http11.py
httpcore/dispatch/http2.py
httpcore/dispatch/threaded.py [new file with mode: 0644]
httpcore/interfaces.py
httpcore/models.py
tests/client/test_auth.py
tests/client/test_cookies.py
tests/client/test_redirects.py
tests/dispatch/test_connection_pools.py
tests/dispatch/test_connections.py
tests/dispatch/test_threaded.py [new file with mode: 0644]
tests/models/test_requests.py
tests/models/test_responses.py
tests/test_api.py
tests/test_decoders.py