Florimond Manca
98bb548a73
Use shebang-style headers in environment variables docs ( #1260 )
2020-09-05 10:30:14 +02:00
Tyler Wozniak
42c66863d0
Raise a proper type error on invalid URL type ( #1259 )
...
* Added test for expected URL class behavior
* Updated URL class, tests pass
* Updated to include type in error message
2020-09-04 23:14:59 +02:00
Florimond Manca
8fa87650b2
Drop urllib3 in favor of public gist ( #1182 )
...
* Drop urllib3 in favor of public gist
* Drop urllib3 coverage omit
* Drop recommendation to use urllib3 transport during Requests migration
* Add urllib3-transport to 3p pkgs
* Drop urllib3 from dependencies list in README / docs home page
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-09-04 22:56:36 +02:00
Taras Sotnikov
642aabdac0
Fix HTTPError doc ( #1255 )
2020-09-04 18:22:05 +01:00
Tom Christie
19b863af40
Header refinements ( #1248 )
...
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-09-02 21:32:48 +01:00
cdeler
def9f1c320
Issue warning on unclosed AsyncClient. ( #1197 )
...
* Made Client and AsyncClient checking for being closed in __del__ (#871 )
* Changed the AsyncClient closing warning type from ResourceWarning (which is too quiet) to UserWarning (#871 )
* Fixed tests and client's __exit__ and __aexit__ after the difficult merge (#871 )
* Update test_proxies.py
* Update test_proxies.py
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-09-02 13:02:59 +01:00
Tom Christie
ec06ba244e
Version 0.14.3 ( #1247 )
2020-09-02 12:17:23 +01:00
Tom Christie
de502a44c6
Drop Response(..., request=...) style in test cases. ( #1243 )
...
* Drop Response(..., request=...) style in test cases except where required
* Lowercase variable name
2020-09-02 10:10:32 +01:00
Stephen Brown II
46b9282c6e
Add "Early Hints" and "Too Early" to Status Codes ( #1244 )
...
To align with Python 3.9: https://docs.python.org/3.9/whatsnew/3.9.html#http
> HTTP status codes 103 EARLY_HINTS, 418 IM_A_TEAPOT and 425 TOO_EARLY are added to http.HTTPStatus. (Contributed by Dong-hee Na in bpo-39509 and Ross Rhodes in bpo-39507.)
da52be4769/Lib/http/__init__.py
2020-09-02 10:04:47 +01:00
Tom Christie
e39a6d9ef4
Use sync client in test cases ( #1241 )
...
* Use sync client in test cases
* Use plain client __init__ style in preference to context manager
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-09-01 22:44:52 +02:00
Tom Christie
cf5970336a
Minor test refactoring ( #1242 )
2020-09-01 22:41:30 +02:00
tbascoul
e0b4528b17
Make the response's request parameter optional ( #1238 )
...
* Make the response's request parameter optional
* Fix _models coverage
* Move DecodingError in _models
* Update httpx/_models.py
* Update _models.py
* Update test_responses.py
* Update test_responses.py
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-09-01 15:14:57 +01:00
Tom Christie
33d339a262
Handle multiple auth headers correctly ( #1240 )
...
Handle multiple auth headers correctly
2020-09-01 14:08:10 +01:00
cdeler
fa7661b306
Closing AsyncClient in all tests ( #871 ) ( #1219 )
...
All over the AsyncClient invocation is made using context manager or with try-finally block
2020-08-31 18:02:28 +03:00
Eduardo Enriquez
aad8209928
Replace httpx.URL for str in tests ( #1237 )
...
Co-authored-by: Eduardo Enriquez (eduzen) <eduardo.enriquez@freshbooks.com>
2020-08-30 08:01:37 +02:00
Moritz E. Beber
9200cb0695
chore: direct questions towards Gitter chat ( #1225 )
2020-08-27 16:57:05 +01:00
Florimond Manca
f5c27ec7f4
Use and pin black 20 ( #1229 )
2020-08-27 14:57:53 +01:00
Tom Christie
28c72050e0
Better test case consistency. Prefer import httpx and httpx.Client. ( #1222 )
...
* Prefer httpx.Client over httpx.AsyncClient in test cases, unless required.
* Prefer httpx.Client in test_headers
* Consistent httpx imports and httpx.Client usage
* Use 'import httpx' consistently in tests. Prefer httpx.Client.
2020-08-26 14:10:23 +01:00
Tom Christie
534400ee42
Context managed transports ( #1218 )
...
* Context managed transports
* Update httpx/_client.py
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update httpx/_client.py
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update tests/client/test_client.py
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update tests/client/test_async_client.py
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Code comment around close/__enter__/__exit__ interaction
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-08-26 12:05:05 +01:00
Tom Christie
4161d7ace9
Version 0.14.2 ( #1207 )
...
* Version 0.14.2
* Update CHANGELOG.md
* Update release notes
2020-08-24 11:03:26 +01:00
cdeler
6e6ece66c6
Made cookies construct-able from a list of tuples ( #1211 )
...
* Added test which checks that cookie might be built from a list of tuples (#1209 )
* Made cookies constructable from a list of tuples (#1209 )
2020-08-24 10:44:48 +01:00
Joe
15c1e42c20
Packaging dependancy tweaks ( #1206 )
...
* Remove idna and add brotli to extras
* Update dependency docs
* Update BrotliDecoder error message
* Add nocover
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-21 12:30:57 +01:00
Tom Christie
19515e8a8b
Fix request auto headers ( #1205 )
...
* Failing test case
* Fix auto_headers in Request.prepare()
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-08-21 12:03:15 +01:00
Tom Christie
f4b407a7c4
Adjust 1.0 expectations. ( #1202 )
...
* Adjust 1.0 expectations.
Not sure why I thought saying "expected September 2020" was a good idea.
Like *maybe* that'll happen, but no problem with us taking our time if there's areas we want to be really firm about first. *Eg finer details in the Transport API*.
* Update index.md
2020-08-20 16:30:45 +01:00
Joe
924fa8c9dc
Add stream docstring ( #1200 )
...
* Add stream() docstring
* Update docs
2020-08-20 10:28:28 +01:00
Joe
bd8165a1b1
Cleanup docstring leftover for #1183 ( #1201 )
...
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-20 17:03:20 +08:00
Joe
84ca2010e1
Add proxies parameter to top-level API functions ( #1198 )
...
* Add `proxies` parameter to top-level API functions
* Fix typo
2020-08-20 15:55:35 +08:00
Tom Christie
25507acdc9
Include underlying httpcore exception tracebacks ( #1199 )
2020-08-19 17:38:52 +01:00
Joe
03cd88c336
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>
2020-08-19 12:10:04 +01:00
Hugo van Kemenade
d10b7cdc51
Use pycon for Python console code blocks ( #1187 )
...
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-08-18 15:17:44 +02:00
Tom Christie
9fa95cce6a
Drop redundant hasattr check ( #1193 )
2020-08-18 11:24:07 +01:00
Florimond Manca
cb620e67c7
Add Client.auth setter ( #1185 )
2020-08-17 14:51:52 +02:00
Florimond Manca
34ba0e14b0
Document Unix Domain Socket usage ( #1186 )
2020-08-17 14:49:09 +02:00
Florimond Manca
09c3e90e3b
Add test for HEAD redirect behavior ( #1184 )
2020-08-16 08:12:17 +02:00
Skyler Dong
a226c60861
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
2020-08-16 07:33:46 +02:00
Simon Willison
891d865044
Corrected docstring on async def request() ( #1181 )
2020-08-16 01:57:44 +08:00
Josep Cugat
842ccfafe6
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
2020-08-15 12:24:26 +02:00
Joe
1729e45031
Make name in httpx.__init__ private ( #1177 )
2020-08-15 11:19:41 +08:00
Tom Christie
655773e1c1
Handle URL quoting username and password components. ( #1159 )
...
* Handle URL quoting username and password components
* Tweak userinfo quoting
2020-08-11 17:18:12 +01:00
Tom Christie
557ad70242
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>
2020-08-11 17:14:12 +01:00
Tom Christie
477824aeaa
Advanced transport docs ( #1165 )
...
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-08-11 17:05:44 +01:00
Joe
5b6d33e29c
Ignore transfer-encoding if content-length presents ( #1170 )
...
* Ignore transfer-encoding if content-length presents
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-11 23:43:57 +08:00
Tom Christie
c277fb816a
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>
2020-08-11 15:40:39 +01:00
Florimond Manca
a4463d044f
Allow disabling auth per-request using auth=None ( #1115 )
...
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-11 15:18:27 +02:00
Tom Christie
db4e417a13
Version 0.14.1 ( #1164 )
2020-08-11 12:04:03 +01:00
Felix Hildén
f540bd0bcf
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>
2020-08-11 10:08:53 +01:00
Joe
45de714592
Map rfc3986 exceptions ( #1163 )
...
* Map rfc3896 exceptions
2020-08-11 09:44:56 +01:00
Tom Christie
7edfe64da6
Minor rfc3986 refactoring ( #1157 )
...
* Minor rfc3986 refactoring
* Update _models.py
2020-08-10 16:46:37 +01:00
Tom Christie
4cf74bc405
Fix behaviour with multiple Set-Cookie headers ( #1156 )
2020-08-10 14:53:51 +01:00
Riccardo Magliocchetti
b9db5e149e
Fix typo in 0.14.0 changelog ( #1148 )
2020-08-08 08:38:08 +01:00