]>
git.ipfire.org Git - thirdparty/httpx.git/log
Josep Cugat [Tue, 2 Jun 2020 09:24:45 +0000 (11:24 +0200)]
Increase test coverage - take 2 (#1012)
* Fix HttpError -> HTTPError typo
* Increased test coverage
* Increase coverage threshold
* Reuse sync/async transport code in test_auth.py
* Removed close_client check inside StreamContextManager
It's never set as True when used in async
* Reuse sync/async transport code in test_redirects.py
Josep Cugat [Sat, 30 May 2020 21:22:03 +0000 (23:22 +0200)]
Increased test coverage & cleanup (#1003)
* Remove unused/untested headers copy() method
Last usage was removed in #804
* Remove unused premature_close server endpoint
Last usage was removed in #804
* Increased test coverage
* Revert removal of headers copy() method
Documented and added tests for it.
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Josep Cugat [Sat, 30 May 2020 21:18:48 +0000 (23:18 +0200)]
Replace remaining occurrences of dispatch with transport (#1010)
* Replace remaining occurrences of dispatch with transport
* Remove unused AsyncDispatcher
Was removed in #804
* Remove hard_limit warning in test
Alexander Pushkov [Sat, 30 May 2020 18:43:15 +0000 (21:43 +0300)]
Remove the UDS section from docs (#1009)
Tom Christie [Fri, 29 May 2020 10:28:27 +0000 (11:28 +0100)]
Version 0.13.3 (#1006)
Tom Christie [Fri, 29 May 2020 10:10:36 +0000 (11:10 +0100)]
Include missing keepalive_expiry configuration (#1005)
Josep Cugat [Thu, 28 May 2020 11:11:17 +0000 (13:11 +0200)]
Improve error when redirecting with custom schemes (#1002)
Fixes #822
Hasan Ramezani [Wed, 27 May 2020 19:29:52 +0000 (21:29 +0200)]
Fixed mypy errors in test_async_client.py and test_client.py (#985)
Tom Christie [Wed, 27 May 2020 14:58:41 +0000 (15:58 +0100)]
Version 0.13.2 (#1001)
Tom Christie [Wed, 27 May 2020 14:17:08 +0000 (15:17 +0100)]
Use AnyStr where appropriate (#999)
* Use AnyStr where appropriate
* Update httpx/_types.py
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update _types.py
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Tue, 26 May 2020 14:03:55 +0000 (15:03 +0100)]
Add "Content-Length: 0" on POST, PUT, PATCH if required. (#995)
* Add Content-Length: 0 on POST, PUT, PATCH if required.
* Update tests/client/test_client.py
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Florimond Manca [Mon, 25 May 2020 06:39:51 +0000 (08:39 +0200)]
Add mypy config for tests directory (#991)
Florimond Manca [Mon, 25 May 2020 05:56:20 +0000 (07:56 +0200)]
Tweak handling of None values in timeout type hints (#992)
Florimond Manca [Sun, 24 May 2020 09:38:24 +0000 (11:38 +0200)]
Remove unused concurrency test utils (#989)
Florimond Manca [Sun, 24 May 2020 08:57:49 +0000 (10:57 +0200)]
Tweak Question issue template (#988)
"Not getting an aswer" from the community chat is not a required item to submit a question issue. :-)
Tom Christie [Fri, 22 May 2020 10:52:08 +0000 (11:52 +0100)]
Add 'http2' for Client (#982)
Tom Christie [Fri, 22 May 2020 09:34:01 +0000 (10:34 +0100)]
Version 0.13.1 (#981)
Jamie Hewland [Fri, 22 May 2020 09:31:21 +0000 (11:31 +0200)]
Fix pool option warnings for default connection pool (#980)
* warn_deprecated: Set stacklevel=2 to get real source of warning
* Use new pool limit options in default pool
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Fri, 22 May 2020 09:30:56 +0000 (10:30 +0100)]
Add urllib3proxy transport to init (#979)
* Update HTTP/2 docs
* Include URLLib3ProxyTransport in top-level API
* Linting
Tom Christie [Fri, 22 May 2020 09:16:08 +0000 (10:16 +0100)]
Update HTTP/2 docs
Tom Christie [Fri, 22 May 2020 08:41:02 +0000 (09:41 +0100)]
Version 0.13 (#971)
* Version 0.13
* Update docs to 0.13 as the latest
* Whitespacing tweak
* More explicit notes about transport API renamings
* Update changelog
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Tom Christie [Fri, 22 May 2020 08:36:04 +0000 (09:36 +0100)]
Add URLLib3ProxyTransport
Florimond Manca [Thu, 21 May 2020 15:41:36 +0000 (17:41 +0200)]
Tighten multipart implementation types (#975)
Florimond Manca [Thu, 21 May 2020 15:34:45 +0000 (17:34 +0200)]
Tweak `files` type hints (#976)
Florimond Manca [Thu, 21 May 2020 14:25:31 +0000 (16:25 +0200)]
Fix bytes support in multipart uploads (#974)
Florimond Manca [Thu, 21 May 2020 14:13:16 +0000 (16:13 +0200)]
Add note on streaming uploads (#973)
Tom Christie [Thu, 21 May 2020 13:30:43 +0000 (14:30 +0100)]
Drop URLLib3Dispatch compat shim (#972)
Tom Christie [Thu, 21 May 2020 13:20:16 +0000 (14:20 +0100)]
Use URLLib3 configuration options for URLLib3 transport (#970)
* Use URLLib3 configuration options for URLLib3 transport
* Drop redundant code
Tom Christie [Thu, 21 May 2020 12:43:34 +0000 (13:43 +0100)]
Update dependencies in docs (#969)
* Update dependencies in docs
* Update README.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update docs/index.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Thu, 21 May 2020 12:26:20 +0000 (13:26 +0100)]
Rename pool limit options (#968)
* Pass proxy_url
* Rename hard_limit/soft_limit
* Use 'warn_deprecated' function
* Update PoolLimits docs
* Linting
* Update httpcore dependancy
* Update port in Transport API to be 'Optional[int]'
Tom Christie [Thu, 21 May 2020 12:21:43 +0000 (13:21 +0100)]
Updates for httpcore 0.9 interface. (#967)
* Pass proxy_url
* Update httpcore dependancy
* Update port in Transport API to be 'Optional[int]'
Yeray Diaz Diaz [Thu, 21 May 2020 11:22:17 +0000 (12:22 +0100)]
Transport API (#963)
* Deprecate Client arg 'dispatch' and use 'transport'
* Remove line in test from coverage
* Document custom transports
* _dispatch > _transports
Also rename *Dispatch classes to *Transport and added aliases
* Fix linting issues
* Missed one _transports import
* Promote URLLib3Transport to public API
* Remove duplicate arg doc
* Assert that urllib3 is imported to use URLLib3Transport
* `AsyncClient`, not asynchronous `Client`
* Add warning category to warn calls
* Update docs/advanced.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Add warn_deprecated utility function
* Amend docs references to dispatch
* Add concrete implementation example
* Clearer transport implementation description
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Fri, 15 May 2020 19:49:08 +0000 (20:49 +0100)]
Clean up docs scripts (#953)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Fri, 15 May 2020 15:17:33 +0000 (16:17 +0100)]
Enforce coverage (#955)
* Enforce coverage when running tests
* Enforce test coverage
Tom Christie [Fri, 15 May 2020 12:22:46 +0000 (13:22 +0100)]
If `scripts/check` fails then prompt and autofix. (#952)
* If scripts/check fails then prompt and autofix
* Update scripts/test
Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
* Update test
Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
Yeray Diaz Diaz [Wed, 13 May 2020 10:53:35 +0000 (11:53 +0100)]
Document pool_limits and SSL context on verify (#942)
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Tue, 12 May 2020 15:02:25 +0000 (16:02 +0100)]
Attempt to resolve test flakiness (#946)
Tom Christie [Tue, 12 May 2020 09:20:22 +0000 (10:20 +0100)]
Version 0.13.0.dev2 (#941)
* Update __version__.py
* Update CHANGELOG.md
* Update setup.py
* Update CHANGELOG.md
Jamie Hewland [Tue, 12 May 2020 09:06:53 +0000 (11:06 +0200)]
ASGI: Wait for response to complete before sending disconnect message (#919)
* asgi: Wait for response to complete before sending disconnect message
* Dial back type checking + remove concurrency module
* Remove somewhat redundant comment
Yeray Diaz Diaz [Wed, 6 May 2020 14:49:00 +0000 (15:49 +0100)]
Version 0.13.0.dev1 (#935)
Yeray Diaz Diaz [Wed, 6 May 2020 14:08:38 +0000 (15:08 +0100)]
Pass http2 flag to proxy dispatch (#934)
Yeray Diaz Diaz [Wed, 6 May 2020 11:11:05 +0000 (12:11 +0100)]
Document dev proxy setup (#933)
Tom Christie [Mon, 4 May 2020 11:52:23 +0000 (12:52 +0100)]
Update test-suite.yml (#925)
Run Test Suite on commits to master.
Florimond Manca [Sat, 2 May 2020 12:29:56 +0000 (14:29 +0200)]
Mark `Response.json()` as returning `Any` (#923)
Ryan Balfanz [Fri, 1 May 2020 18:37:01 +0000 (11:37 -0700)]
Fix small typo (#920)
Tom Christie [Fri, 1 May 2020 12:47:29 +0000 (13:47 +0100)]
Fix VERSION_FILE in publish script. (#916)
Jamie Hewland [Fri, 1 May 2020 09:51:35 +0000 (11:51 +0200)]
asgi: Send http.disconnect message on receive() after response complete (#909)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Thu, 30 Apr 2020 16:09:49 +0000 (17:09 +0100)]
Version 0.13.0.dev0 (#915)
* Version 0.13.0.dev0
* Bump httpcore
* Include packaging in requirements
* Include note on UDS support
* Update CHANGELOG
Tom Christie [Thu, 30 Apr 2020 14:22:54 +0000 (15:22 +0100)]
Publish workflow (#913)
* Publish workflow
* Set PYTHONPATH to allow auto docs to import package
* Seperate install, build, publish steps
Nicholas Guriev [Sat, 25 Apr 2020 07:42:03 +0000 (10:42 +0300)]
Proper warning level of deprecation notice (#908)
This enables us to control emitted messages via the PYTHONWARNINGS
environment variable or by -W option.
Tom Christie [Fri, 24 Apr 2020 15:47:24 +0000 (16:47 +0100)]
Update README.md
Tom Christie [Fri, 24 Apr 2020 15:46:45 +0000 (16:46 +0100)]
Test Suite on GitHub Actions (#907)
* Test Suite on GitHub Actions
* Add linting checks
* Update badges. Drop unused codecov, pending GitHub action support,
David Vo [Sun, 19 Apr 2020 07:03:56 +0000 (17:03 +1000)]
Avoid `hasattr` in hot loop in Brotli decoder (#906)
Florimond Manca [Wed, 15 Apr 2020 11:12:09 +0000 (13:12 +0200)]
Move types definitions to a dedicated module (#902)
Florimond Manca [Fri, 10 Apr 2020 18:40:04 +0000 (20:40 +0200)]
Implement streaming multipart uploads (#857)
* Implement streaming multipart uploads
* Tweak seekable check
* Don't handle duplicate computation yet
* Add memory test for multipart streaming
* Lint
* 1 pct is enough
* Tweak lazy computations, fallback to non-streaming for broken filelikes
* Reduce diff size
* Drop memory test
* Cleanup
Florimond Manca [Fri, 10 Apr 2020 16:48:01 +0000 (18:48 +0200)]
Drop concurrency backends (#901)
* Drop concurrency backends
* Put back as_network_error for use in urllib3 dispatcher
Tom Christie [Wed, 8 Apr 2020 12:32:10 +0000 (13:32 +0100)]
Httpcore interface (#804)
* First pass as switching dispatchers over to httpcore interface
* Updates for httpcore interface
* headers in dispatch API as plain list of bytes
* Integrate against httpcore 0.6
* Integrate against httpcore interface
* Drop UDS, since not supported by httpcore
* Fix base class for mock dispatchers in tests
* Merge master and mark as potential '0.13.dev0' release
Tom Christie [Wed, 8 Apr 2020 12:15:22 +0000 (13:15 +0100)]
Revert "Add content-length header for empty bytestream (#866)" (#898)
This reverts commit
939f3ce7ce43d11f3a9829dabaa292b3a906b56d.
Florimond Manca [Sun, 29 Mar 2020 13:55:12 +0000 (15:55 +0200)]
Add issue templates (#880)
* Add issue templates
* Fix typos/phrasing
* Swap docs and GH search
Co-Authored-By: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
* Drop code example in favor of prose
* Update .github/ISSUE_TEMPLATE/2-bug-report.md
Co-Authored-By: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
Co-authored-by: Yeray Diaz Diaz <yeraydiazdiaz@gmail.com>
Ed Singleton [Sun, 29 Mar 2020 11:13:01 +0000 (12:13 +0100)]
Fix support for generator-based WSGI apps (#887)
* Handle generator WSGI app
* Lint code
* Add type annotations
* Add more tests
* Refactor test to use application_factory
* Remove content length as it's misleading
* Add test for WSGI generator
* Add test for empty generator
* Remove previous tests
* Move docstring to a comment
* Fix whitespace
* Fix name of function
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
* Update tests/test_wsgi.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
* Update tests/test_wsgi.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
* Update httpx/_dispatch/wsgi.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Florimond Manca [Sun, 29 Mar 2020 11:12:05 +0000 (13:12 +0200)]
Improve type hinting for `HTTPError.request` (#886)
Florimond Manca [Sun, 29 Mar 2020 10:46:38 +0000 (12:46 +0200)]
Fix casing nits (#889)
Florimond Manca [Sun, 29 Mar 2020 10:44:56 +0000 (12:44 +0200)]
Remove stitches in `requirements.txt` (#888)
* Remove stitches in requirements.txt
* Put back attrs pin
Florimond Manca [Sun, 29 Mar 2020 09:39:31 +0000 (11:39 +0200)]
Drop usage of `AnyStr` (#882)
Ed Singleton [Sat, 28 Mar 2020 16:22:10 +0000 (16:22 +0000)]
Fix Client Docstring and add AsyncClient to API docs (#883)
* Fix docstring of Client
* Add AsyncClient to API docs
* Add AsyncClient to ToC
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Dima Boger [Sat, 28 Mar 2020 15:05:06 +0000 (18:05 +0300)]
Add content-length header for empty bytestream (#866)
Also, fixed related tests
Florimond Manca [Thu, 26 Mar 2020 14:43:04 +0000 (15:43 +0100)]
Add 'Third Party Packages' docs page (#876)
Srikanth Chekuri [Wed, 25 Mar 2020 21:33:16 +0000 (03:03 +0530)]
Add docs on request instances to Requests compatibility guide (#823)
* Update docs/compatibility.md
* Add prepare_request equivalent of httpx to compatibility document
* Add difference b/w httpx.Request and requests.Request arguments to compatibility document
* Update docs/compatibility.md
* Remove Request arguments section
* Add new section Request instantiation with necessary info
* Update docs/compatibility.md
Commit the suggested changes
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Thu, 19 Mar 2020 20:55:13 +0000 (20:55 +0000)]
Version 0.12.1 (#868)
Dima Boger [Mon, 16 Mar 2020 21:34:50 +0000 (00:34 +0300)]
Fix multipart edge cases with `data={}` and/or `files={}` (#861)
* Add reproducible test example for empty multipart
* Possible fix for empty combination of files/data
* Return bytestream with empty data/files
* Remove content-length in test
Co-authored-by: florimondmanca <florimond.manca@gmail.com>
Florimond Manca [Sun, 15 Mar 2020 09:30:58 +0000 (10:30 +0100)]
Fix type checking breakage (#865)
Tom Christie [Mon, 9 Mar 2020 14:51:04 +0000 (14:51 +0000)]
Update CHANGELOG.md (#854)
Tom Christie [Mon, 9 Mar 2020 10:18:34 +0000 (10:18 +0000)]
Version 0.12 (#852)
* Version 0.12
* Update docs to reference 0.12
Tom Christie [Fri, 6 Mar 2020 09:10:50 +0000 (09:10 +0000)]
Version 0.12 (#849)
* Version 0.12
* Tweak whicespacing
Tom Christie [Thu, 5 Mar 2020 12:56:47 +0000 (12:56 +0000)]
Do not mark wheel as universal (#851)
Evan Lurvey [Mon, 2 Mar 2020 15:51:34 +0000 (09:51 -0600)]
Enable NO_PROXY environment variable support (#835)
* Enabling NO_PROXY env support
* Enabling NO_PROXY env var support and writing tests
* Update tests/client/test_proxies.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
* Update tests/client/test_proxies.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Mon, 2 Mar 2020 10:34:04 +0000 (10:34 +0000)]
Don't support broken dict-of-dicts case for data argument (#811)
Florimond Manca [Sun, 1 Mar 2020 20:38:01 +0000 (21:38 +0100)]
Revamp docs on Client instances (#836)
* Revamp docs on Client instances
* Apply suggestions from code review
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
* Reword 'Why use a Client?' section
* Apply suggestions from code review
Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
Yeray Diaz Diaz [Sun, 1 Mar 2020 19:34:16 +0000 (19:34 +0000)]
Remove proxies from Request docstring (#839)
Florimond Manca [Thu, 27 Feb 2020 20:42:18 +0000 (21:42 +0100)]
Drop backend parameter on AsyncClient (#791)
* Drop backend parameter on AsyncClient
* Fix master merge
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Thu, 27 Feb 2020 20:41:28 +0000 (20:41 +0000)]
Close proxy dispatch classes on Client.close() (#826)
zueve [Thu, 27 Feb 2020 11:32:10 +0000 (13:32 +0200)]
Forward `cert` param to SSLConf if `verify=False` (#796)
Piotr Staroszczyk [Mon, 24 Feb 2020 12:29:51 +0000 (13:29 +0100)]
When setting headers, fallback to `utf-8` if no encoding is specified yet. (#820)
* Headers: fallback to utf8 encoding
* Headers.__setitem__: use utf8 only if encoding is not set
Piotr Staroszczyk [Mon, 24 Feb 2020 10:09:52 +0000 (11:09 +0100)]
Drop RedirectLoop exception (#819)
* drop RedirectLoop exception
* tests is package to allow run it easly
* bring back test for redirect loop
Tom Christie [Wed, 19 Feb 2020 11:38:14 +0000 (11:38 +0000)]
Add 'chat' to docs (#818)
Primož Godec [Wed, 12 Feb 2020 15:19:48 +0000 (16:19 +0100)]
Adding NetworkError to __init__ (#814)
George Kettleborough [Mon, 10 Feb 2020 12:10:11 +0000 (12:10 +0000)]
Add Auth.requires_response_body attribute (#803)
* Add Auth.requires_response_body attribute
If set then responses are read by the client before being sent back into the auth flow
* Update tests and docs
* PR fixes
* Change example methods
Colin Bounouar [Thu, 6 Feb 2020 12:40:42 +0000 (13:40 +0100)]
Document that iter_* methods are synchronous (#807)
Florimond Manca [Mon, 3 Feb 2020 12:05:56 +0000 (13:05 +0100)]
Use a base_url in app dispatcher examples (#799)
Florimond Manca [Tue, 28 Jan 2020 14:34:43 +0000 (15:34 +0100)]
Switch to private module names (#785)
* Rename modules
* Update names in package
* Fix tests
* Review docs
Tim Gates [Sun, 26 Jan 2020 06:24:41 +0000 (17:24 +1100)]
Fix simple typo: conncurrent -> concurrent (#793)
Closes #792
Jung Sang-jun [Wed, 22 Jan 2020 10:50:06 +0000 (19:50 +0900)]
Fix ProxyMode for code in dispatch/proxy_http (#788)
FORWARD_ONLY seems correct
Yeray Diaz Diaz [Mon, 20 Jan 2020 13:50:50 +0000 (13:50 +0000)]
Detect credentials in proxy URLs and create Proxy-authorization header (#780)
* Detect auth in proxy URLs and create Proxy-authorization header
* Add credentials and SOCKS details to proxy documentation
* Use URL.copy_with to remove credentials from URL
Tom Christie [Fri, 17 Jan 2020 21:31:56 +0000 (21:31 +0000)]
Version 0.11.1 (#773)
* Version 0.11.1
* Update changelog
* Update CHANGELOG.md
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Fri, 17 Jan 2020 11:42:51 +0000 (11:42 +0000)]
Handle redirect with malformed Location headers missing host. (#774)
Tom Christie [Fri, 17 Jan 2020 09:45:37 +0000 (09:45 +0000)]
Fix for streaming a redirect response body with allow_redirects=False (#766)
Tom Christie [Tue, 14 Jan 2020 14:09:08 +0000 (14:09 +0000)]
Fix urllib3 proxy instantiation (#763)
Florimond Manca [Tue, 14 Jan 2020 09:01:09 +0000 (10:01 +0100)]
Add an async example to intro snippets (#750)
Tom Christie [Tue, 14 Jan 2020 09:00:52 +0000 (09:00 +0000)]
Support both zlib and deflate encodings (#758)
* Support both zlib and deflate encodings
* Helpful test docstrings
Hugo van Kemenade [Mon, 13 Jan 2020 10:26:31 +0000 (12:26 +0200)]
Add docs and repo to project_urls metadata (#753)
* Add docs and repo to project_urls metadata
For programmatic access to metadata on PyPI.
* Add Trove classifier: Python 3 Only