]> git.ipfire.org Git - thirdparty/httpx.git/log
thirdparty/httpx.git
5 years agoCleaner no proxy support (#1103) 1118/head
Tom Christie [Sun, 2 Aug 2020 09:00:45 +0000 (10:00 +0100)] 
Cleaner no proxy support (#1103)

* Add internal URLMatcher class

* Use URLMatcher for proxy lookups in transport_for_url

* Docstring

* Pin pytest

* Add support for no-proxies configurations

* Don't call should_not_proxy on each request

* Drop print statements

* Tweak comment

* Tweak comment on domain wildcards

* Update httpx/_utils.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Pull test_should_not_be_proxied cases into test_proxies_environ

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoRename PoolLimits to Limits (#1113)
Florimond Manca [Sat, 1 Aug 2020 19:44:58 +0000 (21:44 +0200)] 
Rename PoolLimits to Limits (#1113)

* Rename PoolLimits to Limits

* Lint

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoSwitch to more concise Timeout parameters (#1111)
Florimond Manca [Sat, 1 Aug 2020 18:59:01 +0000 (20:59 +0200)] 
Switch to more concise Timeout parameters (#1111)

* Switch to more concise Timeout parameters

* Update docs

* Rename attributes

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoMake Headers.keys(), Headers.values() and Headers.items() return set-like views ...
Florimond Manca [Sat, 1 Aug 2020 18:15:15 +0000 (20:15 +0200)] 
Make Headers.keys(), Headers.values() and Headers.items() return set-like views (#1114)

5 years agoClient.trust_env becomes read-only (#1112)
Florimond Manca [Sat, 1 Aug 2020 10:04:38 +0000 (12:04 +0200)] 
Client.trust_env becomes read-only (#1112)

5 years agoRename URLMatcher -> URLPattern (#1109)
Florimond Manca [Sat, 1 Aug 2020 09:07:31 +0000 (11:07 +0200)] 
Rename URLMatcher -> URLPattern (#1109)

5 years agoDrop the auto-prompting 'do you want to run scripts/lint now' (#1107)
Tom Christie [Sat, 1 Aug 2020 08:39:28 +0000 (09:39 +0100)] 
Drop the auto-prompting 'do you want to run scripts/lint now' (#1107)

5 years agoException hierarchy (#1095)
Tom Christie [Fri, 31 Jul 2020 11:57:49 +0000 (12:57 +0100)] 
Exception hierarchy (#1095)

* Exception heirachy

* Exception heirarchy

* Formatting tweaks

* Update httpx/_exceptions.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update httpx/_exceptions.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update httpx/_exceptions.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update httpx/_exceptions.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoConsistent multidict methods (#1089)
Tom Christie [Fri, 31 Jul 2020 10:46:35 +0000 (11:46 +0100)] 
Consistent multidict methods (#1089)

* Consistent multidict methods

* Consistent multidict methods and behaviour

* Update httpx/_models.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update httpx/_models.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agohttpx.Timeout must include a default (#1085)
Tom Christie [Fri, 31 Jul 2020 10:41:53 +0000 (11:41 +0100)] 
httpx.Timeout must include a default (#1085)

* httpx.Timeout must include a default

* Tweak docstring

* Gentle deprecation for mandatory default on httpx.Timeout(...)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoUse public API only from transports (#1096)
Tom Christie [Fri, 31 Jul 2020 10:30:55 +0000 (11:30 +0100)] 
Use public API only from transports (#1096)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoAdd support for no-proxy configurations (#1099)
Tom Christie [Fri, 31 Jul 2020 09:21:11 +0000 (10:21 +0100)] 
Add support for no-proxy configurations (#1099)

* Add internal URLMatcher class

* Use URLMatcher for proxy lookups in transport_for_url

* Docstring

* Pin pytest

* Add support for no-proxies configurations

5 years agoURL matching (#1098)
Tom Christie [Fri, 31 Jul 2020 09:11:49 +0000 (10:11 +0100)] 
URL matching (#1098)

* Add internal URLMatcher class

* Use URLMatcher for proxy lookups in transport_for_url

* Docstring

* Pin pytest

* Update httpx/_utils.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoIgnore PermissionError in netrc_info() (#1104)
Tom Christie [Thu, 30 Jul 2020 14:40:13 +0000 (15:40 +0100)] 
Ignore PermissionError in netrc_info() (#1104)

* Ignore PermissionError in netrc_info()

5 years agoPin pytest
Tom Christie [Thu, 30 Jul 2020 14:31:03 +0000 (15:31 +0100)] 
Pin pytest

5 years agoIncluded create_ssl_context function to create the same context with SSLConfig and...
Can Sarıgöl [Mon, 27 Jul 2020 18:46:46 +0000 (20:46 +0200)] 
Included create_ssl_context function to create the same context with SSLConfig and serve as API (#996)

* Included create_ssl_context function to create the same context with SSLConfig and serve as API.

* Changed create_ssl_context with SSLConfig into the client implementation and tests.

* Dropped the __repr__ and __eq__ methods from SSLConfig and removed SSLConfig using from tests

* Fixed test issue regarding cert_authority trust of ssl context

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoSingle consistent name for status codes (#1088)
Tom Christie [Mon, 27 Jul 2020 13:35:01 +0000 (14:35 +0100)] 
Single consistent name for status codes (#1088)

* Single consistent name for status codes
* Gentle deprecation for httpx.StatusCode

5 years agoDrop extraneous `proxy` argument on `URLLib3Transport`. (#1090)
Tom Christie [Sun, 26 Jul 2020 19:45:17 +0000 (20:45 +0100)] 
Drop extraneous `proxy` argument on `URLLib3Transport`. (#1090)

* Update urllib3.py

Drop `proxy` argument that has been accidentally left over on `URLLib3Transport`.
It's not used anywhere, and it's not relevant since we seperate `URLLib3Transport` and `URLLib3ProxyTransport` classes.

* Update urllib3.py

5 years agoTighten public API on auth classes (#1084)
Tom Christie [Sun, 26 Jul 2020 18:05:33 +0000 (19:05 +0100)] 
Tighten public API on auth classes (#1084)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoKeep Proxy._build_auth_header as a private method (#1087)
Tom Christie [Sun, 26 Jul 2020 17:27:07 +0000 (18:27 +0100)] 
Keep Proxy._build_auth_header as a private method (#1087)

5 years agoFull coverage, with exception of URLLib3Transport (#1086)
Tom Christie [Fri, 24 Jul 2020 14:24:06 +0000 (15:24 +0100)] 
Full coverage, with exception of URLLib3Transport (#1086)

5 years agoURL.port becomes Optional[int] (#1080)
Tom Christie [Fri, 24 Jul 2020 10:42:13 +0000 (11:42 +0100)] 
URL.port becomes Optional[int] (#1080)

* URL.port becomes Optional[int], not int

* Minor _transport_for_url refactor

* Add docstring

5 years agoParameterize invalid URL tests (#1079)
Tom Christie [Thu, 23 Jul 2020 09:40:00 +0000 (10:40 +0100)] 
Parameterize invalid URL tests (#1079)

5 years agoDrop `URL(allow_relative=bool)` (#1073)
Tom Christie [Thu, 23 Jul 2020 09:16:51 +0000 (10:16 +0100)] 
Drop `URL(allow_relative=bool)` (#1073)

* Drop URL(allow_relative=bool)

* Update httpx/_models.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Linting

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoInclude 'request' on TooManyRedirect and RequestBodyUnavailable (#1077)
Tom Christie [Thu, 23 Jul 2020 08:55:21 +0000 (09:55 +0100)] 
Include 'request' on TooManyRedirect and RequestBodyUnavailable (#1077)

5 years agoRefactor map_exceptions (#1076)
Tom Christie [Thu, 23 Jul 2020 08:55:07 +0000 (09:55 +0100)] 
Refactor map_exceptions (#1076)

5 years agoDrop private Origin model (#1070)
Tom Christie [Thu, 23 Jul 2020 08:54:45 +0000 (09:54 +0100)] 
Drop private Origin model (#1070)

* Drop private Origin model

* Drop Origin from docs

* Update tests/test_utils.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Drop full_path test

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoFixes for LineDecoding (#1075)
Tom Christie [Thu, 23 Jul 2020 08:45:35 +0000 (09:45 +0100)] 
Fixes for LineDecoding (#1075)

* Fixes #1033 - Ensure that text that spans 3 invocations before newline is handled - don't clobber the buffer between invocations that haven't seen any lines.
This seems like a one character fix + the test.

* Update the tests.

* Undo formatting/indentation.

* Update long comment.

* Fix trailing cr line decoding

Co-authored-by: Sheridan C Rawlins <scr@verizonmedia.com>
5 years agoclient.netrc should be private (#1071)
Tom Christie [Thu, 23 Jul 2020 08:44:54 +0000 (09:44 +0100)] 
client.netrc should be private (#1071)

5 years agoDrop fullpath setter (#1069)
Tom Christie [Thu, 23 Jul 2020 08:43:11 +0000 (09:43 +0100)] 
Drop fullpath setter (#1069)

5 years agoSkip HSTS preloading on single-label domains (#1074)
François Voron [Tue, 21 Jul 2020 09:40:10 +0000 (11:40 +0200)] 
Skip HSTS preloading on single-label domains (#1074)

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoFixes #1033 - Ensure that text that spans 3 invocations before newline is handled...
Sheridan C Rawlins [Tue, 21 Jul 2020 09:33:45 +0000 (02:33 -0700)] 
Fixes #1033 - Ensure that text that spans 3 invocations before newline is handled - don't clobber the buffer between invocations that haven't seen any lines. (#1034)

Fixes #1033 - Ensure that text that spans 3 invocations before newline is handled - don't clobber the buffer between invocations that haven't seen any lines.

5 years agoRaise HTTPStatusError in raise_from_status (#1072)
François Voron [Mon, 20 Jul 2020 12:10:57 +0000 (14:10 +0200)] 
Raise HTTPStatusError in raise_from_status (#1072)

5 years agoMore public API tightening (#1065)
Tom Christie [Fri, 17 Jul 2020 10:19:24 +0000 (11:19 +0100)] 
More public API tightening (#1065)

5 years agoTighten public client methods (#997)
Tom Christie [Fri, 17 Jul 2020 09:20:52 +0000 (10:20 +0100)] 
Tighten public client methods (#997)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoUse relative tests directory references (#1052)
Florimond Manca [Thu, 16 Jul 2020 14:28:31 +0000 (16:28 +0200)] 
Use relative tests directory references (#1052)

* Use relative tests directory references

* Use absolute TESTS_DIR

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoSupport QueryParams(None) (#1060)
Tom Christie [Thu, 16 Jul 2020 10:16:29 +0000 (11:16 +0100)] 
Support QueryParams(None) (#1060)

5 years agoDrop deprecated proxies API (#1058)
Tom Christie [Thu, 16 Jul 2020 08:44:41 +0000 (09:44 +0100)] 
Drop deprecated proxies API (#1058)

5 years agoDrop deprecated API (#1057)
Tom Christie [Wed, 15 Jul 2020 11:19:56 +0000 (12:19 +0100)] 
Drop deprecated API (#1057)

* Drop ASGIDispatch, WSGIDispatch, which has been replaced by ASGITransport, WSGITransport.
* Drop dispatch=... on client, which has been replaced by transport=...
* Drop soft_limit, hard_limit, which have been replaced by max_keepalive and max_connections.
* Drop Response.stream and Response.raw, which have been replaced by aiter_bytes and aiter_raw.
* Drop internal usage of as_network_error in favour of map_exceptions.

5 years agoAdd "manual streaming mode" docs (#1046)
Florimond Manca [Tue, 7 Jul 2020 12:37:12 +0000 (14:37 +0200)] 
Add "manual streaming mode" docs (#1046)

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoType check tests (#1054)
Florimond Manca [Tue, 7 Jul 2020 09:10:43 +0000 (11:10 +0200)] 
Type check tests (#1054)

5 years agoAdd missing `Response.next()` (#1055)
Florimond Manca [Tue, 7 Jul 2020 08:54:50 +0000 (10:54 +0200)] 
Add missing `Response.next()` (#1055)

5 years agoPin isort version (#1053)
Josep Cugat [Sun, 5 Jul 2020 16:19:26 +0000 (18:19 +0200)] 
Pin isort version (#1053)

5 years agoSimplify bytes to hex string conversion (#1049)
Taneli Hukkinen [Sun, 5 Jul 2020 10:16:55 +0000 (13:16 +0300)] 
Simplify bytes to hex string conversion (#1049)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoRemove needless whitespace strips (#1048)
Taneli Hukkinen [Sun, 5 Jul 2020 09:58:44 +0000 (12:58 +0300)] 
Remove needless whitespace strips (#1048)

5 years agoMake isort configuration compatible with isort v5 (#1050)
Taneli Hukkinen [Sat, 4 Jul 2020 21:31:09 +0000 (00:31 +0300)] 
Make isort configuration compatible with isort v5 (#1050)

* Make isort configuration compatible with isort v5

* Use isort's black profile

5 years agoMap HTTPCore exceptions (#1044)
Florimond Manca [Fri, 3 Jul 2020 13:56:10 +0000 (15:56 +0200)] 
Map HTTPCore exceptions (#1044)

* Map HTTPCore exceptions

* Expose new TimeoutException

5 years agoAdd exceptions missing from top-level package (#1045)
Florimond Manca [Fri, 3 Jul 2020 13:18:24 +0000 (15:18 +0200)] 
Add exceptions missing from top-level package (#1045)

* Expose missing exceptions: CloseError, ConnectError, ReadError, WriteError

* Lint

5 years agoImprove list/dict comprehensions (#1036)
Taneli Hukkinen [Thu, 2 Jul 2020 15:45:00 +0000 (18:45 +0300)] 
Improve list/dict comprehensions (#1036)

* Improve list/dict comprehensions

* Dont make needless list() conversions before bytes.join()

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoRemove unused type checker ignores (#1038)
Taneli Hukkinen [Thu, 2 Jul 2020 15:30:15 +0000 (18:30 +0300)] 
Remove unused type checker ignores (#1038)

* Remove unused type checker ignores

* Add back a type ignore required in py36

5 years agoRemove .encode("ascii") call from null byte (#1037)
Taneli Hukkinen [Mon, 29 Jun 2020 21:15:22 +0000 (00:15 +0300)] 
Remove .encode("ascii") call from null byte (#1037)

5 years agoAdd support for multiple files per POST field (#1032)
euri10 [Wed, 24 Jun 2020 17:17:27 +0000 (19:17 +0200)] 
Add support for multiple files per POST field (#1032)

* Changed RequestFiles type

* Changed RequestFiles type 2

* Added test for multiple files same field

* Lint

* Mypy no idea

* Added doc

* Fixed some docs typos

* Checking the right instance type and deleting the mypy ignore

* Docs clarification

* Back on images form field, with other files modified

5 years agoAdd note on data fields in multipart form encoding (#1022)
Florimond Manca [Mon, 15 Jun 2020 18:40:17 +0000 (20:40 +0200)] 
Add note on data fields in multipart form encoding (#1022)

* Add note on data fields in multipart form encoding

* Fix message

5 years agoRefactor ASGITransport.request() (#1021)
Florimond Manca [Sat, 13 Jun 2020 17:59:09 +0000 (19:59 +0200)] 
Refactor ASGITransport.request() (#1021)

5 years agoRun ASGI tests on trio too (#1020)
Florimond Manca [Sat, 13 Jun 2020 17:42:36 +0000 (19:42 +0200)] 
Run ASGI tests on trio too (#1020)

5 years agoUpdate contributing docs (#1011)
Yeray Diaz Diaz [Tue, 2 Jun 2020 09:31:56 +0000 (10:31 +0100)] 
Update contributing docs (#1011)

* Update contributing docs

* Update docs/contributing.md

Co-authored-by: Josep Cugat <jcugat@gmail.com>
* Update docs/contributing.md

Co-authored-by: Josep Cugat <jcugat@gmail.com>
* Update docs/contributing.md

Co-authored-by: Josep Cugat <jcugat@gmail.com>
Co-authored-by: Josep Cugat <jcugat@gmail.com>
5 years agoIncrease test coverage - take 2 (#1012)
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

5 years agoIncreased test coverage & cleanup (#1003)
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>
5 years agoReplace remaining occurrences of dispatch with transport (#1010)
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

5 years agoRemove the UDS section from docs (#1009)
Alexander Pushkov [Sat, 30 May 2020 18:43:15 +0000 (21:43 +0300)] 
Remove the UDS section from docs (#1009)

5 years agoVersion 0.13.3 (#1006) 0.13.3
Tom Christie [Fri, 29 May 2020 10:28:27 +0000 (11:28 +0100)] 
Version 0.13.3 (#1006)

5 years agoInclude missing keepalive_expiry configuration (#1005)
Tom Christie [Fri, 29 May 2020 10:10:36 +0000 (11:10 +0100)] 
Include missing keepalive_expiry configuration (#1005)

5 years agoImprove error when redirecting with custom schemes (#1002)
Josep Cugat [Thu, 28 May 2020 11:11:17 +0000 (13:11 +0200)] 
Improve error when redirecting with custom schemes (#1002)

Fixes #822

5 years agoFixed mypy errors in test_async_client.py and test_client.py (#985)
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)

5 years agoVersion 0.13.2 (#1001) 0.13.2
Tom Christie [Wed, 27 May 2020 14:58:41 +0000 (15:58 +0100)] 
Version 0.13.2 (#1001)

5 years agoUse AnyStr where appropriate (#999)
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>
5 years agoAdd "Content-Length: 0" on POST, PUT, PATCH if required. (#995)
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>
5 years agoAdd mypy config for tests directory (#991)
Florimond Manca [Mon, 25 May 2020 06:39:51 +0000 (08:39 +0200)] 
Add mypy config for tests directory (#991)

5 years agoTweak handling of None values in timeout type hints (#992)
Florimond Manca [Mon, 25 May 2020 05:56:20 +0000 (07:56 +0200)] 
Tweak handling of None values in timeout type hints (#992)

5 years agoRemove unused concurrency test utils (#989)
Florimond Manca [Sun, 24 May 2020 09:38:24 +0000 (11:38 +0200)] 
Remove unused concurrency test utils (#989)

5 years agoTweak Question issue template (#988)
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. :-)

5 years agoAdd 'http2' for Client (#982)
Tom Christie [Fri, 22 May 2020 10:52:08 +0000 (11:52 +0100)] 
Add 'http2' for Client (#982)

5 years agoVersion 0.13.1 (#981) 0.13.1
Tom Christie [Fri, 22 May 2020 09:34:01 +0000 (10:34 +0100)] 
Version 0.13.1 (#981)

5 years agoFix pool option warnings for default connection pool (#980)
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>
5 years agoAdd urllib3proxy transport to init (#979)
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

5 years agoUpdate HTTP/2 docs
Tom Christie [Fri, 22 May 2020 09:16:08 +0000 (10:16 +0100)] 
Update HTTP/2 docs

5 years agoVersion 0.13 (#971) 0.13.0
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>
5 years agoAdd URLLib3ProxyTransport
Tom Christie [Fri, 22 May 2020 08:36:04 +0000 (09:36 +0100)] 
Add URLLib3ProxyTransport

5 years agoTighten multipart implementation types (#975)
Florimond Manca [Thu, 21 May 2020 15:41:36 +0000 (17:41 +0200)] 
Tighten multipart implementation types (#975)

5 years agoTweak `files` type hints (#976)
Florimond Manca [Thu, 21 May 2020 15:34:45 +0000 (17:34 +0200)] 
Tweak `files` type hints (#976)

5 years agoFix bytes support in multipart uploads (#974)
Florimond Manca [Thu, 21 May 2020 14:25:31 +0000 (16:25 +0200)] 
Fix bytes support in multipart uploads (#974)

5 years agoAdd note on streaming uploads (#973)
Florimond Manca [Thu, 21 May 2020 14:13:16 +0000 (16:13 +0200)] 
Add note on streaming uploads (#973)

5 years agoDrop URLLib3Dispatch compat shim (#972)
Tom Christie [Thu, 21 May 2020 13:30:43 +0000 (14:30 +0100)] 
Drop URLLib3Dispatch compat shim (#972)

5 years agoUse URLLib3 configuration options for URLLib3 transport (#970)
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

5 years agoUpdate dependencies in docs (#969)
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>
5 years agoRename pool limit options (#968)
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]'

5 years agoUpdates for httpcore 0.9 interface. (#967)
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]'

5 years agoTransport API (#963)
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>
5 years agoClean up docs scripts (#953)
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>
5 years agoEnforce coverage (#955)
Tom Christie [Fri, 15 May 2020 15:17:33 +0000 (16:17 +0100)] 
Enforce coverage (#955)

* Enforce coverage when running tests

* Enforce test coverage

5 years agoIf `scripts/check` fails then prompt and autofix. (#952)
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>
5 years agoDocument pool_limits and SSL context on verify (#942)
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>
5 years agoAttempt to resolve test flakiness (#946)
Tom Christie [Tue, 12 May 2020 15:02:25 +0000 (16:02 +0100)] 
Attempt to resolve test flakiness (#946)

5 years agoVersion 0.13.0.dev2 (#941) 0.13.0.dev2
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

5 years agoASGI: Wait for response to complete before sending disconnect message (#919)
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

5 years agoVersion 0.13.0.dev1 (#935) 0.13.0.dev1
Yeray Diaz Diaz [Wed, 6 May 2020 14:49:00 +0000 (15:49 +0100)] 
Version 0.13.0.dev1 (#935)

5 years agoPass http2 flag to proxy dispatch (#934)
Yeray Diaz Diaz [Wed, 6 May 2020 14:08:38 +0000 (15:08 +0100)] 
Pass http2 flag to proxy dispatch (#934)

5 years agoDocument dev proxy setup (#933)
Yeray Diaz Diaz [Wed, 6 May 2020 11:11:05 +0000 (12:11 +0100)] 
Document dev proxy setup (#933)

5 years agoUpdate test-suite.yml (#925)
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.

5 years agoMark `Response.json()` as returning `Any` (#923)
Florimond Manca [Sat, 2 May 2020 12:29:56 +0000 (14:29 +0200)] 
Mark `Response.json()` as returning `Any` (#923)