]> git.ipfire.org Git - thirdparty/httpx.git/log
thirdparty/httpx.git
5 years agoMap httpcore exceptions for `Response` read methods (#1190)
Joe [Wed, 19 Aug 2020 11:10:04 +0000 (19:10 +0800)] 
Map httpcore exceptions for `Response` read methods (#1190)

* Map httpcore exceptions for `Response.iter_*` methods

* Tweak

* Change wording

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoUse pycon for Python console code blocks (#1187)
Hugo van Kemenade [Tue, 18 Aug 2020 13:17:44 +0000 (16:17 +0300)] 
Use pycon for Python console code blocks (#1187)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoDrop redundant hasattr check (#1193)
Tom Christie [Tue, 18 Aug 2020 10:24:07 +0000 (11:24 +0100)] 
Drop redundant hasattr check (#1193)

5 years agoAdd `Client.auth` setter (#1185)
Florimond Manca [Mon, 17 Aug 2020 12:51:52 +0000 (14:51 +0200)] 
Add `Client.auth` setter (#1185)

5 years agoDocument Unix Domain Socket usage (#1186)
Florimond Manca [Mon, 17 Aug 2020 12:49:09 +0000 (14:49 +0200)] 
Document Unix Domain Socket usage (#1186)

5 years agoAdd test for HEAD redirect behavior (#1184)
Florimond Manca [Sun, 16 Aug 2020 06:12:17 +0000 (08:12 +0200)] 
Add test for HEAD redirect behavior (#1184)

5 years agoFix #1146 Set default allow_redirects to true (#1183)
Skyler Dong [Sun, 16 Aug 2020 05:33:46 +0000 (00:33 -0500)] 
Fix #1146 Set default allow_redirects to true (#1183)

* Set default allow_redirects to true

* Set default allow_redirects to true

* Fix line-too-long linting error by removing comments

5 years agoCorrected docstring on async def request() (#1181)
Simon Willison [Sat, 15 Aug 2020 17:57:44 +0000 (10:57 -0700)] 
Corrected docstring on async def request() (#1181)

5 years agoAdd exported members test (#1179)
Josep Cugat [Sat, 15 Aug 2020 10:24:26 +0000 (12:24 +0200)] 
Add exported members test (#1179)

Taken from https://github.com/encode/httpcore/pull/156
Added as a followup of https://github.com/encode/httpx/pull/1177#issuecomment-674252582

5 years agoMake `name` in httpx.__init__ private (#1177)
Joe [Sat, 15 Aug 2020 03:19:41 +0000 (11:19 +0800)] 
Make `name` in httpx.__init__ private (#1177)

5 years agoHandle URL quoting username and password components. (#1159)
Tom Christie [Tue, 11 Aug 2020 16:18:12 +0000 (17:18 +0100)] 
Handle URL quoting username and password components. (#1159)

* Handle URL quoting username and password components

* Tweak userinfo quoting

5 years agoInclude invalid url exception in docs (#1166)
Tom Christie [Tue, 11 Aug 2020 16:14:12 +0000 (17:14 +0100)] 
Include invalid url exception in docs (#1166)

* Advanced transport docs

* Include InvalidURL in exception docs

* Update docs/exceptions.md

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoAdvanced transport docs (#1165)
Tom Christie [Tue, 11 Aug 2020 16:05:44 +0000 (17:05 +0100)] 
Advanced transport docs (#1165)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoIgnore transfer-encoding if content-length presents (#1170)
Joe [Tue, 11 Aug 2020 15:43:57 +0000 (23:43 +0800)] 
Ignore transfer-encoding if content-length presents (#1170)

* Ignore transfer-encoding if content-length presents

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoSet `__module__ = 'httpx'` on everything we expose via the public API. (#1155)
Tom Christie [Tue, 11 Aug 2020 14:40:39 +0000 (15:40 +0100)] 
Set `__module__ = 'httpx'` on everything we expose via the public API. (#1155)

* Set __module__='httpx' on everything we expose via the public API

* Linting

* Update httpx/__init__.py

* Update httpx/__init__.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoAllow disabling auth per-request using `auth=None` (#1115)
Florimond Manca [Tue, 11 Aug 2020 13:18:27 +0000 (15:18 +0200)] 
Allow disabling auth per-request using `auth=None` (#1115)

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoVersion 0.14.1 (#1164) 0.14.1
Tom Christie [Tue, 11 Aug 2020 11:04:03 +0000 (12:04 +0100)] 
Version 0.14.1 (#1164)

5 years agoExpand client docstrings (#1152)
Felix Hildén [Tue, 11 Aug 2020 09:08:53 +0000 (12:08 +0300)] 
Expand client docstrings (#1152)

* Add AsyncClient.aclose to API documentation

* Expand client docstrings
* Add docstrings for all verbs and close methods
* Include parameter merge information and see also

* Update _client.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoMap rfc3986 exceptions (#1163)
Joe [Tue, 11 Aug 2020 08:44:56 +0000 (16:44 +0800)] 
Map rfc3986 exceptions (#1163)

* Map rfc3896 exceptions

5 years agoMinor rfc3986 refactoring (#1157)
Tom Christie [Mon, 10 Aug 2020 15:46:37 +0000 (16:46 +0100)] 
Minor rfc3986 refactoring (#1157)

* Minor rfc3986 refactoring

* Update _models.py

5 years agoFix behaviour with multiple Set-Cookie headers (#1156)
Tom Christie [Mon, 10 Aug 2020 13:53:51 +0000 (14:53 +0100)] 
Fix behaviour with multiple Set-Cookie headers (#1156)

5 years agoFix typo in 0.14.0 changelog (#1148)
Riccardo Magliocchetti [Sat, 8 Aug 2020 07:38:08 +0000 (09:38 +0200)] 
Fix typo in 0.14.0 changelog (#1148)

5 years agoMinor formatting tweak to CHANGELOG (#1142)
Tom Christie [Fri, 7 Aug 2020 15:12:52 +0000 (16:12 +0100)] 
Minor formatting tweak to CHANGELOG (#1142)

* Update CHANGELOG.md

* Update CHANGELOG.md

5 years agoVersion 0.14.0 (#1083) 0.14.0
Tom Christie [Fri, 7 Aug 2020 14:50:25 +0000 (15:50 +0100)] 
Version 0.14.0 (#1083)

* Version 0.14.0

* Update CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>
* Update CHANGELOG

* max_keepalive_connections

* Add deprecation test

* Update CHANGELOG.md

* Undate dependency pin callout

* Update expected 1.0 release date

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>
5 years agoHTTP/2 becomes fully optional (#1140)
Tom Christie [Fri, 7 Aug 2020 14:16:21 +0000 (15:16 +0100)] 
HTTP/2 becomes fully optional (#1140)

* HTTP/2 becomes fully optional

* Fix linting, coverage

5 years agoDocument exceptions (#1138)
Tom Christie [Fri, 7 Aug 2020 13:17:49 +0000 (14:17 +0100)] 
Document exceptions (#1138)

* Document exceptions

* Update exceptions.md

5 years agoUpdate to httpcore 0.10 (#1126)
Tom Christie [Fri, 7 Aug 2020 13:14:11 +0000 (14:14 +0100)] 
Update to httpcore 0.10 (#1126)

* Keep HTTPError as a base class for .request() and .raise_for_status()

* Updates for httpcore 0.10

* Update httpx/_exceptions.py

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>
* Use httpcore.SimpleByteStream/httpcore.IteratorByteStream

* Use httpcore.PlainByteStream

* Merge master

* Update to httpcore 0.10.x

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>
5 years agoFixed warnings in unit tests suite, caused by #1127 PR (#1137)
cdeler [Thu, 6 Aug 2020 12:41:11 +0000 (15:41 +0300)] 
Fixed warnings in unit tests suite, caused by #1127 PR (#1137)

5 years ago#1066 make BaseClient's timeout accessible using getters and setters (#1135)
cdeler [Thu, 6 Aug 2020 11:09:21 +0000 (14:09 +0300)] 
#1066 make BaseClient's timeout accessible using getters and setters (#1135)

5 years agoDeprecate URL.is_ssl (#1128)
Tom Christie [Wed, 5 Aug 2020 18:10:59 +0000 (19:10 +0100)] 
Deprecate URL.is_ssl (#1128)

5 years agoNote on differences in proxy keys vs. `requests` (#1132)
Tom Christie [Wed, 5 Aug 2020 18:06:03 +0000 (19:06 +0100)] 
Note on differences in proxy keys vs. `requests` (#1132)

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoBase URL improvements (#1130)
Tom Christie [Wed, 5 Aug 2020 17:56:25 +0000 (18:56 +0100)] 
Base URL improvements (#1130)

* URL.join(url=...), not URL.join(relative_url=...)

* Fix URL.join()

* Support no argument 'httpx.URL()' usage

* Support client.base_url as a property

* Resolve base_url joining behaviour

* Fix coverage

* Update _client.py

5 years agoRaise warning if proxy key is eg. "all" instead of "all://". (#1127)
cdeler [Wed, 5 Aug 2020 17:41:50 +0000 (20:41 +0300)] 
Raise warning if proxy key is eg. "all" instead of "all://". (#1127)

* #1105 added deprecation warning, raised when we try to use proxies={"http": ...} instead of {"http://": ...}. Updated docs and added unit, which check the warning presence

* Update tests/client/test_proxies.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update tests/client/test_proxies.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
5 years agoClean up keyword argument name, using URL.join(url=...), not URL.join(relative_url...
Tom Christie [Wed, 5 Aug 2020 17:32:34 +0000 (18:32 +0100)] 
Clean up keyword argument name, using URL.join(url=...), not URL.join(relative_url=...). (#1129)

* URL.join(url=...), not URL.join(relative_url=...)

* Fix URL.join()

5 years agoDrop HSTS Preloading (#1110)
Florimond Manca [Wed, 5 Aug 2020 12:05:45 +0000 (14:05 +0200)] 
Drop HSTS Preloading (#1110)

* Drop HSTS Preloading

* Update test_client.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
5 years agoKeep HTTPError as a base class for .request() and .raise_for_status() (#1125)
Tom Christie [Mon, 3 Aug 2020 19:06:18 +0000 (20:06 +0100)] 
Keep HTTPError as a base class for .request() and .raise_for_status() (#1125)

5 years agoRefine docs phrasing on proxy routing (#1124)
Florimond Manca [Mon, 3 Aug 2020 09:29:03 +0000 (11:29 +0200)] 
Refine docs phrasing on proxy routing (#1124)

5 years agoRevamp proxies documentation (#1123)
Florimond Manca [Sun, 2 Aug 2020 12:02:43 +0000 (14:02 +0200)] 
Revamp proxies documentation (#1123)

5 years agoSetting `app=...` or `transport=...` should bypass environment proxies. (#1122)
Tom Christie [Sun, 2 Aug 2020 11:42:36 +0000 (12:42 +0100)] 
Setting `app=...` or `transport=...` should bypass environment proxies. (#1122)

* Setting app= or transport= should bypass proxies

* Tweak

5 years agoUse get_list consistently (#1119)
Tom Christie [Sun, 2 Aug 2020 10:33:50 +0000 (11:33 +0100)] 
Use get_list consistently (#1119)

* Use get_list consistently

* Ensure DeprecationWarning on getlist vs. get_list

5 years agoHandle bare env proxy hostname gracefully (#1120)
Joe [Sun, 2 Aug 2020 09:48:09 +0000 (17:48 +0800)] 
Handle bare env proxy hostname gracefully (#1120)

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