]>
git.ipfire.org Git - thirdparty/httpx.git/log
Tom Christie [Fri, 13 Nov 2020 12:38:03 +0000 (12:38 +0000)]
Drop NBSP characters (#1389)
podhmo [Wed, 11 Nov 2020 09:10:33 +0000 (18:10 +0900)]
fix code example, in async.md (#1388)
Tom Christie [Tue, 10 Nov 2020 10:16:07 +0000 (10:16 +0000)]
Update butterfly logo (#1382)
Kyungmin Lee [Sun, 8 Nov 2020 09:28:38 +0000 (18:28 +0900)]
Fix typo (#1386)
* Fix typo
three greater-than signs -> three dots
* Fix typo
three greater-than signs -> three dots
* Fix typo
three greater-than signs -> three dots
plotski [Thu, 5 Nov 2020 10:46:22 +0000 (10:46 +0000)]
Include invalid name/value when raising TypeError in DataField (#1368)
Aber [Sat, 24 Oct 2020 21:32:51 +0000 (05:32 +0800)]
Add new project to Third Party Packages (#1364)
* Add new project to Third Party Packages
* Fix typo
Co-authored-by: Josep Cugat <jcugat@gmail.com>
* Update third-party-packages.md
Co-authored-by: Josep Cugat <jcugat@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Florimond Manca [Sat, 24 Oct 2020 21:25:31 +0000 (23:25 +0200)]
Drop unecessary host="localhost" in https_server fixture to fix CI build (#1367)
Tom Christie [Wed, 14 Oct 2020 06:38:53 +0000 (07:38 +0100)]
Close AsyncClient properly in test_async_next_request (#1361)
Simon Willison [Fri, 9 Oct 2020 15:46:26 +0000 (08:46 -0700)]
Add raw_path to scope in ASGITransport (#1357)
* Add raw_path to scope in ASGITransport, closes #1356
* Tweaked test
Tom Christie [Thu, 8 Oct 2020 12:14:15 +0000 (13:14 +0100)]
Version 0.16.1 (#1354)
cdeler [Thu, 8 Oct 2020 12:05:30 +0000 (15:05 +0300)]
Replacing pytest-cov by coverage (#1353)
Tom Christie [Thu, 8 Oct 2020 11:04:10 +0000 (12:04 +0100)]
Force lowercase ASGI headers (#1351)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
cdeler [Thu, 8 Oct 2020 08:37:13 +0000 (11:37 +0300)]
Correctly handle ipv6 addresses as a part of URL (#1349)
* Correctly handle ipv6 addresses as a host
* Fixed typo
* Added an extra rfc reference
* Update tests/models/test_url.py
* Update tests/models/test_url.py
Tom Christie [Tue, 6 Oct 2020 14:29:40 +0000 (15:29 +0100)]
Version 0.16 (#1347)
Michael K [Tue, 6 Oct 2020 13:57:30 +0000 (13:57 +0000)]
Run tests against Python 3.9 stable (#1348)
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Tue, 6 Oct 2020 13:57:10 +0000 (14:57 +0100)]
Preserve header casing (#1338)
Tom Christie [Tue, 6 Oct 2020 13:53:07 +0000 (14:53 +0100)]
Drop `.next()`/`.anext()` in favour of `response.next_request` (#1339)
* Drop response.next()/response.anext() in favour of response.next_request
* Drop NotRedirectResponse
Tom Christie [Tue, 6 Oct 2020 12:38:05 +0000 (13:38 +0100)]
Tighten client closed-state behaviour (#1346)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Michael K [Tue, 6 Oct 2020 12:12:52 +0000 (12:12 +0000)]
Run tests against Python 3.9 and add trove classifier (#1342)
Co-authored-by: Tom Christie <tom@tomchristie.com>
Jair Henrique [Mon, 5 Oct 2020 20:11:52 +0000 (17:11 -0300)]
Add VCR.py to third party packages doc. (#1345)
Changsheng [Fri, 2 Oct 2020 15:34:57 +0000 (11:34 -0400)]
Allow covariants of __enter__, __aenter__, and @classmethod (#1336)
* Allow covariants of __enter__, __aenter__, and @classmethod
The problem we currently have is the return type of classes such as
Client does not allow covariants when subclassing or context manager.
In other words:
```python
class Base:
def __enter__(self) -> Base: # XXX
return self
class Derived(Base):
...
with Derived() as derived:
# The type of derived is Base but not Derived. It is WRONG
...
```
There are three approaches to improve type annotations.
1. Just do not type-annotate and let the type checker infer
`return self`.
2. Use a generic type with a covariant bound
`_AsyncClient = TypeVar('_AsyncClient', bound=AsyncClient)`
3. Use a generic type `T = TypeVar('T')` or `Self = TypeVar('Self')`
They have pros and cons.
1. It just works and is not friendly to developers as there is no type
annotation at the first sight. A developer has to reveal its type via
a type checker. Aslo, documentation tools that rely on type
annotations lack the type. I haven't found any python docuementation
tools that rely on type inference to infer `return self`. There are
some tools simply check annotations.
2. This approach is correct and has a nice covariant bound that adds
type safety. It is also nice to documentation tools and _somewhat_
friendly to developers. Type checkers, pyright that I use, always
shows the the bounded type '_AsyncClient' rather than the subtype.
Aslo, it requires more key strokes. Not good, not good.
It is used by `BaseException.with_traceback`
See https://github.com/python/typeshed/pull/4298/files
3. This approach always type checks, and I believe it _will_ be the
official solution in the future. Fun fact, Rust has a Self type
keyword. It is slightly unfriendly to documentation, but is simple to
implement and easy to understand for developers. Most importantly,
type checkers love it.
See https://github.com/python/mypy/issues/1212
But, we can have 2 and 3 combined:
```python
_Base = typing.TypeVar('_Base', bound=Base)
class Base:
def __enter__(self: _Base) -> _Base:
return self
class Derive(Base): ...
with Derived() as derived:
... # type of derived is Derived and it's a subtype of Base
```
* revert back type of of SteamContextManager to Response
* Remove unused type definitions
* Add comment and link to PEP484 for clarification
* Switch to `T = TypeVar("T", covariant=True)`
* fixup! Switch to `T = TypeVar("T", covariant=True)`
* Add back bound=xxx in TypeVar
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Fri, 2 Oct 2020 12:15:23 +0000 (13:15 +0100)]
Fix typo in CHANGELOG (#1337)
Tom Christie [Thu, 1 Oct 2020 12:57:08 +0000 (13:57 +0100)]
Version 0.15.5 (#1335)
* Version 0.15.5
* Tweak ChangeLog
Tom Christie [Thu, 1 Oct 2020 12:52:03 +0000 (13:52 +0100)]
Add `response.next_request` (#1334)
* Add response.next_request
* Add response.next_request
* Add response.next_request to the docs
Johannes [Sun, 27 Sep 2020 20:15:04 +0000 (21:15 +0100)]
Small namedtuple refactor (#1329)
Plus order consistency because why not..
Tom Christie [Fri, 25 Sep 2020 11:34:52 +0000 (12:34 +0100)]
Version 0.15.4 (#1327)
* Version 0.15.4
* Update CHANGELOG
* Update CHANGELOG
* Update CHANGELOG
Musale Martin [Fri, 25 Sep 2020 11:28:34 +0000 (14:28 +0300)]
Support header comparisons with dict or list. (#1326)
* Support header comparisons with dict or list.
* Add check for no headers item
* Fixup testcases affected by headers comparison using dict or list
* Update test_responses.py
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Fri, 25 Sep 2020 10:29:17 +0000 (11:29 +0100)]
Fix automatic .read() when Response instances are created with content=<str> (#1324)
Tom Christie [Thu, 24 Sep 2020 16:50:30 +0000 (17:50 +0100)]
Fix warning test case (#1322)
Johannes [Thu, 24 Sep 2020 10:08:07 +0000 (11:08 +0100)]
Remove seed-isort-config (#1321)
As of isort 5 seed-isort-config is no longer needed.
We can get rid of some explicit config too as it's now more clever.
Florimond Manca [Thu, 24 Sep 2020 09:39:02 +0000 (11:39 +0200)]
Release 0.15.3 (#1318)
daa [Thu, 24 Sep 2020 07:42:26 +0000 (10:42 +0300)]
Properly close stream on async response close (#1316)
Tom Christie [Wed, 23 Sep 2020 10:28:22 +0000 (11:28 +0100)]
Version 0.15.2 (#1314)
* Fix response.elapsed
* Version 0.15.2
Tom Christie [Wed, 23 Sep 2020 10:26:12 +0000 (11:26 +0100)]
Fix response.elapsed (#1313)
Tom Christie [Wed, 23 Sep 2020 10:25:54 +0000 (11:25 +0100)]
Fix stream unsetting auth (#1312)
* Fix ASGITransport path escaping
* Add failing test case for auth with streaming
* Fix .stream setting auth=None
emlazzarin [Wed, 23 Sep 2020 09:42:21 +0000 (02:42 -0700)]
update arg name to `max_keepalive_connections` (#1309)
The old name `max_keepalive` was removed recently, so this updates the docs.
Tom Christie [Wed, 23 Sep 2020 09:12:50 +0000 (10:12 +0100)]
Version 0.15.1 (#1308)
* Update CHANGELOG.md
* Update __version__.py
Tom Christie [Wed, 23 Sep 2020 08:37:19 +0000 (09:37 +0100)]
Fix ASGITransport path escaping (#1307)
Tom Christie [Tue, 22 Sep 2020 10:57:14 +0000 (11:57 +0100)]
Update docs for 0.15 (#1306)
Tom Christie [Tue, 22 Sep 2020 10:51:52 +0000 (11:51 +0100)]
Include 0.15.0 release date. (#1305)
Tom Christie [Tue, 22 Sep 2020 10:49:33 +0000 (11:49 +0100)]
Include curio support in CHANGELOG (#1304)
Tom Christie [Tue, 22 Sep 2020 10:44:28 +0000 (11:44 +0100)]
Version 0.15.0 (#1301)
* Version 0.15.0
* Update CHANGELOG.md
Co-authored-by: Jamie Hewland <jamie.hewland@hpe.com>
* Escalate deprecations into removals.
* Deprecate overly verbose timeout parameter names
* Fully deprecate max_keepalive in favour of explicit max_keepalive_connections
* Fully deprecate PoolLimits in favour of Limits
* Deprecate instantiating 'Timeout' without fully explicit values
* Include deprecation notes in changelog
* Use httpcore 0.11.x
Co-authored-by: Jamie Hewland <jamie.hewland@hpe.com>
Tom Christie [Mon, 21 Sep 2020 10:35:25 +0000 (11:35 +0100)]
Finesse URL properties (#1285)
* url.userinfo should be URL encoded bytes
* Neater copy_with implementation
* Finesse API around URL properties and copy_with
* Docstring for URL, and drop url.authority
* Support url.copy_with(raw_path=...)
* Docstrings on URL methods
* Tweak docstring
Tom Christie [Mon, 21 Sep 2020 10:19:19 +0000 (11:19 +0100)]
Support Response(text=...), Response(html=...), Response(json=...) (#1297)
* Refactor content_streams internally
* Tidy up multipart
* Use ByteStream annotation internally
* Support Response(text=...), Response(html=...), Response(json=...)
* Add tests for Response(text=..., html=..., json=...)
Tom Christie [Fri, 18 Sep 2020 13:17:03 +0000 (14:17 +0100)]
Update _client.py (#1300)
Tom Christie [Fri, 18 Sep 2020 11:00:43 +0000 (12:00 +0100)]
Neater Host header logic on redirects (#1299)
Tom Christie [Fri, 18 Sep 2020 10:50:13 +0000 (11:50 +0100)]
NetRC lookups should use host, not host+port (#1298)
Tom Christie [Fri, 18 Sep 2020 09:50:15 +0000 (10:50 +0100)]
Refactor content streams (#1296)
* Refactor content_streams internally
* Tidy up multipart
* Use ByteStream annotation internally
Tom Christie [Fri, 18 Sep 2020 07:41:09 +0000 (08:41 +0100)]
Drop ContentStream (#1295)
* Drop ContentStream
Tom Christie [Thu, 17 Sep 2020 10:59:42 +0000 (11:59 +0100)]
Requests from transport API (#1293)
* Refactoring to support instantiating requests from transport API
* Minor refactoring
Tom Christie [Thu, 17 Sep 2020 08:33:36 +0000 (09:33 +0100)]
encode -> encode_request (#1292)
Tom Christie [Thu, 17 Sep 2020 08:11:41 +0000 (09:11 +0100)]
Update README.md (#1291)
* Update README.md
* Update index.md
Stephen Brown II [Wed, 16 Sep 2020 01:45:20 +0000 (19:45 -0600)]
Fix function name in event hooks docs (#1290)
Tom Christie [Tue, 15 Sep 2020 12:36:10 +0000 (13:36 +0100)]
Seperate `content=...` and `data=...` parameters (#1266)
* Seperate content=... and data=... parameters
* Update compatibility.md
Tom Christie [Tue, 15 Sep 2020 11:05:39 +0000 (12:05 +0100)]
Event hooks (#1246)
* Add EventHooks internal datastructure
* Add support for 'request' and 'response' event hooks
* Support Client.event_hooks property
* Handle exceptions raised by response event hooks
* Docs for event hooks
* Only support 'request' and 'response' event hooks
* Add event_hooks to top-level API
* Event hooks
* Formatting
* Formatting
* Fix up event hooks test
* Add test case to confirm that redirects/event hooks don't currently play together correctly
* Refactor test cases
* Make response.request clear in response event hooks docs
* Drop merge marker
* Request event hook runs as soon as we have an auth-constructed request
Tom Christie [Tue, 15 Sep 2020 10:20:19 +0000 (11:20 +0100)]
Drop chardet (#1269)
* Internal refactoring to swap auth/redirects ordering
* Drop chardet for charset detection
* Drop chardet in favour of simpler charset autodetection
* Revert unintentionally included changes
* Update test case
* Refactor to prefer different decoding style
* Update text decoding docs/docstrings
* Resolve typo
* Update docs/quickstart.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Mon, 14 Sep 2020 16:44:05 +0000 (17:44 +0100)]
Refactor test_auth.py to use `MockTransport` class. (#1288)
* Use tests.utils.MockTransport
* Use tests.utils.MockTransport
cdeler [Mon, 14 Sep 2020 11:16:45 +0000 (14:16 +0300)]
Refactoring of models api (#1284)
* Made Request.prepare private (i.e. renamed it to _prepare)
* Added bytes as a new possible QueryParamTypes
Tom Christie [Sat, 12 Sep 2020 18:41:47 +0000 (19:41 +0100)]
Pin `flake8-pie` (#1286)
* Pin `flake8-pie`
* Update requirements.txt
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Sat, 12 Sep 2020 10:16:10 +0000 (11:16 +0100)]
Refactor tests to use `MockTransport(<handler_function>)` (#1281)
* Support Response(content=<bytes iterator>)
* Update test for merged master
* Add MockTransport for test cases
* Use MockTransport for redirect tests
* Reduce change footprint
* Reduce change footprint
* Clean up headers slightly
* Update requirements.txt
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Fri, 11 Sep 2020 13:37:51 +0000 (14:37 +0100)]
Refactor to use isinstance(..., typing.Iterator) (#1282)
Tom Christie [Fri, 11 Sep 2020 09:28:18 +0000 (10:28 +0100)]
Support `Response(content=<bytes iterator>)` (#1265)
* Support Response(content=<bytes iterator>)
* Update test for merged master
Bart [Thu, 10 Sep 2020 19:22:14 +0000 (21:22 +0200)]
Update compatibility.md: mention differing query parameter handling (#1262)
* Update compatibility.md
* Update docs/compatibility.md
* Update docs/compatibility.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Thu, 10 Sep 2020 14:10:31 +0000 (15:10 +0100)]
Minor decoder refactoring. (#1276)
* Switch auth/redirect methods to follow flow of execution better
* Drop response.decoder property
* Decoder -> ContentDecoder
* Decoder -> ContentDecoder
Tom Christie [Thu, 10 Sep 2020 11:28:08 +0000 (12:28 +0100)]
Progress examples (#1272)
* Progress examples
* Update advanced.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Thu, 10 Sep 2020 10:44:36 +0000 (11:44 +0100)]
Switch auth/redirect methods to follow flow of execution better (#1273)
cdeler [Thu, 10 Sep 2020 09:16:00 +0000 (12:16 +0300)]
Add progress to streaming download (#1268)
* Added last_raw_chunk_size to the Response object (#1208)
* Added example with progress bar (#1208)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Apply suggestions from code review
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* PR review
Changed last_raw_chunk_size to num_bytes_downloaded ;
Edited the example according to documentaion
* Update docs/advanced.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update docs/advanced.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Update docs/advanced.md
* Update docs/advanced.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Thu, 10 Sep 2020 08:12:05 +0000 (09:12 +0100)]
Swap auth/redirects ordering (#1267)
* Internal refactoring to swap auth/redirects ordering
* Test for auth with cross domain redirect
Florimond Manca [Wed, 9 Sep 2020 13:37:20 +0000 (15:37 +0200)]
Add support for sync-specific or async-specific auth flows (#1217)
* Add support for async auth flows
* Move body logic to Auth, add sync_auth_flow, add NoAuth
* Update tests
* Stick to next() / __anext__()
* Fix undefined name errors
* Add docs
* Add unit tests for auth classes
Co-authored-by: Tom Christie <tom@tomchristie.com>
cdeler [Wed, 9 Sep 2020 09:01:39 +0000 (12:01 +0300)]
Fixed test_multiple_set_cookie (#1270)
* Fixed test_multiple_set_cookie
* Update test_cookies.py
Co-authored-by: Tom Christie <tom@tomchristie.com>
Tom Christie [Mon, 7 Sep 2020 08:06:14 +0000 (09:06 +0100)]
Drop `request.timer` attribute. (#1249)
* Drop request.timer attribute
* Response(..., elapsed_func=...)
cdeler [Sun, 6 Sep 2020 11:52:37 +0000 (14:52 +0300)]
Edited documentation about proxy-envs usage (#404) (#1257)
* Edited documentation about proxy-envs usage (#404)
* PR review (#404)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* PR review (#404)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
* Fix typo
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Florimond Manca [Sat, 5 Sep 2020 08:30:14 +0000 (10:30 +0200)]
Use shebang-style headers in environment variables docs (#1260)
Tyler Wozniak [Fri, 4 Sep 2020 21:14:59 +0000 (14:14 -0700)]
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
Florimond Manca [Fri, 4 Sep 2020 20:56:36 +0000 (22:56 +0200)]
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>
Taras Sotnikov [Fri, 4 Sep 2020 17:22:05 +0000 (19:22 +0200)]
Fix HTTPError doc (#1255)
Tom Christie [Wed, 2 Sep 2020 20:32:48 +0000 (21:32 +0100)]
Header refinements (#1248)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
cdeler [Wed, 2 Sep 2020 12:02:59 +0000 (15:02 +0300)]
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>
Tom Christie [Wed, 2 Sep 2020 11:17:23 +0000 (12:17 +0100)]
Version 0.14.3 (#1247)
Tom Christie [Wed, 2 Sep 2020 09:10:32 +0000 (10:10 +0100)]
Drop Response(..., request=...) style in test cases. (#1243)
* Drop Response(..., request=...) style in test cases except where required
* Lowercase variable name
Stephen Brown II [Wed, 2 Sep 2020 09:04:47 +0000 (03:04 -0600)]
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.)
https://github.com/python/cpython/blob/
da52be47690da0d9f78d0dce9ee5c3e4dbef49e1 /Lib/http/__init__.py
Tom Christie [Tue, 1 Sep 2020 20:44:52 +0000 (21:44 +0100)]
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>
Tom Christie [Tue, 1 Sep 2020 20:41:30 +0000 (21:41 +0100)]
Minor test refactoring (#1242)
tbascoul [Tue, 1 Sep 2020 14:14:57 +0000 (16:14 +0200)]
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>
Tom Christie [Tue, 1 Sep 2020 13:08:10 +0000 (14:08 +0100)]
Handle multiple auth headers correctly (#1240)
Handle multiple auth headers correctly
cdeler [Mon, 31 Aug 2020 15:02:28 +0000 (18:02 +0300)]
Closing AsyncClient in all tests (#871) (#1219)
All over the AsyncClient invocation is made using context manager or with try-finally block
Eduardo Enriquez [Sun, 30 Aug 2020 06:01:37 +0000 (08:01 +0200)]
Replace httpx.URL for str in tests (#1237)
Co-authored-by: Eduardo Enriquez (eduzen) <eduardo.enriquez@freshbooks.com>
Moritz E. Beber [Thu, 27 Aug 2020 15:57:05 +0000 (17:57 +0200)]
chore: direct questions towards Gitter chat (#1225)
Florimond Manca [Thu, 27 Aug 2020 13:57:53 +0000 (15:57 +0200)]
Use and pin black 20 (#1229)
Tom Christie [Wed, 26 Aug 2020 13:10:23 +0000 (14:10 +0100)]
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.
Tom Christie [Wed, 26 Aug 2020 11:05:05 +0000 (12:05 +0100)]
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>
Tom Christie [Mon, 24 Aug 2020 10:03:26 +0000 (11:03 +0100)]
Version 0.14.2 (#1207)
* Version 0.14.2
* Update CHANGELOG.md
* Update release notes
cdeler [Mon, 24 Aug 2020 09:44:48 +0000 (12:44 +0300)]
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)
Joe [Fri, 21 Aug 2020 11:30:57 +0000 (19:30 +0800)]
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>
Tom Christie [Fri, 21 Aug 2020 11:03:15 +0000 (12:03 +0100)]
Fix request auto headers (#1205)
* Failing test case
* Fix auto_headers in Request.prepare()
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
Tom Christie [Thu, 20 Aug 2020 15:30:45 +0000 (16:30 +0100)]
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
Joe [Thu, 20 Aug 2020 09:28:28 +0000 (17:28 +0800)]
Add stream docstring (#1200)
* Add stream() docstring
* Update docs
Joe [Thu, 20 Aug 2020 09:03:20 +0000 (17:03 +0800)]
Cleanup docstring leftover for #1183 (#1201)
Co-authored-by: Tom Christie <tom@tomchristie.com>
Joe [Thu, 20 Aug 2020 07:55:35 +0000 (15:55 +0800)]
Add `proxies` parameter to top-level API functions (#1198)
* Add `proxies` parameter to top-level API functions
* Fix typo
Tom Christie [Wed, 19 Aug 2020 16:38:52 +0000 (17:38 +0100)]
Include underlying httpcore exception tracebacks (#1199)