Tom Christie
b0bf2a7513
SSLConfig refactor ( #706 )
...
* SSLConfig includes 'http2' argument on init.
* Pass SSL config to HTTPConnection as a single argument
* Don't run SSL context loading in threadpool
2020-01-02 10:54:04 +00:00
Tom Christie
a9f4d018e1
Version 0.10.1 ( #701 )
2020-01-01 15:36:11 +00:00
Tom Christie
b8394f1e00
Bump coverage ( #705 )
...
* Bump coverage
* Tests for iterative text decoding with 'aiter_text'
* nocover on xfail exception cases
* nocover API that is pending deprecation
* Tweak test to removed uncovered line
* Ingest request body in RedirectBodyUnavailable test case
2020-01-01 15:33:24 +00:00
Joe
f5d4bb8074
Make timeout parameter None-able & cleanup __all__. ( #704 )
...
* Timeout type annotation includes `None`.
* Cleanup `__all__` exports.
2020-01-01 13:45:38 +00:00
Tom Christie
c050480387
Drop unused Request.cookies ( #703 )
2020-01-01 13:05:49 +00:00
Tom Christie
fe86c0c4b4
Drop unused SSLConfig.with_overrides ( #702 )
2019-12-31 15:24:50 +00:00
Tom Christie
2c4a1dd519
Drop OpenConnection ( #700 )
2019-12-31 13:18:23 +00:00
Tom Christie
56afde1f9f
Lock around stream.write and stream.close operations ( #699 )
2019-12-31 13:18:00 +00:00
David Larlet
22663bc66e
Update link to timeout fine tuning in quickstart ( #696 )
2019-12-31 12:02:14 +00:00
Gabriel Strauss
de8b95533d
Adds check to enforce single consumption of AsyncIteratorStream. ( #697 )
2019-12-31 12:01:43 +00:00
Tom Christie
35b7516674
Version 0.10.0 ( #691 )
...
* Version 0.10.0
* Update CHANGELOG.md
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
* Include changelog for 'response.request is no longer optional'.
* Add response.elapsed note to changelog
* Also ref original PR for response.elapsed behavior
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2019-12-29 17:00:34 +00:00
Tom Christie
6a1ee0eb97
response.elapsed now reflects entire request/response time. ( #692 )
...
* Changed behaviour of elapsed on response
* Fixed api docs for Response elapsed
* Minor tweaks to 'request.elapsed'
* Response instantiated with content should have elapsed==0
* Fix elapsed time on immediately closed responses.
2019-12-29 16:56:18 +00:00
Tom Christie
1f9d0154df
Switch from an Event primitive to a Lock primitive ( #693 )
2019-12-29 16:38:54 +00:00
Florimond Manca
e284b84bf9
Rename Client to AsyncClient (with compat synonym) ( #680 )
...
* Rename Client to AsyncClient (with compat synonym)
* Document motivation for AsyncClient renaming
Co-authored-by: Tom Christie <tom@tomchristie.com>
2019-12-29 15:34:23 +00:00
Florimond Manca
3462999366
Rename 'next' to 'anext' on Response ( #676 )
...
* Rename 'next' to 'anext' on Response
* Drop iscoroutinefunction() check
Co-authored-by: Tom Christie <tom@tomchristie.com>
2019-12-29 15:34:07 +00:00
Florimond Manca
d5da7430a2
Rename 'close' to 'aclose' on Client ( #675 )
...
* Switch to aclose on Client
* Fix reference to aclose in API docs
2019-12-29 15:15:09 +00:00
Florimond Manca
f9d18a8758
Rename 'read/close' to 'aread/aclose' on Response ( #674 )
...
* Switch to aread/aclose on responses
* Linting
Co-authored-by: Tom Christie <tom@tomchristie.com>
2019-12-29 15:14:53 +00:00
Tom Christie
25b40db757
Drop Request.read() ( #679 )
2019-12-29 15:02:03 +00:00
Florimond Manca
e9ebd1df98
Drop per-request cert, verify, and trust_env ( #617 )
...
* Drop per-request cert/verify/trust_env
* Remove cert/verify from the dispatcher API
* Apply lint
* Reintroduce cert/verify/trust_env on client methods, with errors
2019-12-29 15:01:20 +00:00
Tom Christie
f3b799912e
Gracefully end_stream early on no-body requests. ( #682 )
2019-12-23 10:49:36 +00:00
Florimond Manca
0ee0005154
Type-check test_cookies.py ( #677 )
2019-12-23 10:51:06 +01:00
Florimond Manca
49e4d155ee
Type-check test_auth.py ( #665 )
...
* Type-check test_auth.py
* Drop request cast
2019-12-21 18:48:55 +01:00
Florimond Manca
e30ec85016
Fix out-of-date methods on Response API docs ( #673 )
2019-12-21 17:21:14 +01:00
Florimond Manca
d0427bead0
Clean up 'backend' fixture ( #664 )
...
* Clean up 'backend' fixture
* Add docstring to 'async_environment' fixture
2019-12-21 16:08:40 +01:00
Florimond Manca
56c8edaf66
Make 'request' non-optional on responses ( #666 )
...
* Make 'request' non-optional on Response
* Lint
* Remove remaining mention to null request
2019-12-21 15:38:25 +01:00
Florimond Manca
9e88f2e2fb
Remove httpxprof ( #663 )
2019-12-21 14:17:14 +00:00
Andrés Álvarez
e34df7a7a1
Rename concurrency directory to backends ( #662 )
...
Closes #659
2019-12-20 16:53:42 +00:00
Tom Christie
cee1fccaca
Use Streams API for both requests and responses. ( #648 )
...
* Internal ContentStreams API
2019-12-20 16:05:04 +00:00
Tom Christie
36af9d9597
Rationalize backend Semaphore interface slightly ( #660 )
2019-12-20 15:14:55 +00:00
Tom Christie
bb6ab205fe
Upgrade h11 to support both 0.8 and 0.9 ( #658 )
2019-12-20 15:14:30 +00:00
Tom Christie
9904684d35
Version 0.9.5 ( #657 )
2019-12-20 11:18:22 +00:00
Tom Christie
74e5115b86
params argument on URL should merge, not replace. ( #653 )
2019-12-20 10:46:35 +00:00
Tom Christie
5ee512d803
Fix Host header and HSTS when the default port is explicitly included in URL ( #649 )
2019-12-20 10:25:42 +00:00
Tom Christie
6c69e0936b
No I/O auth ( #644 )
...
* No I/O on Auth
2019-12-18 15:25:31 +00:00
Tom Christie
8d4f182500
Added RequestContent ( #636 )
...
* Request Content
* Added RequestContent interface
* Docstrings on 'encode(data, files, json)'
* Update httpx/content.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
* can_rewind -> can_replay
2019-12-18 10:51:34 +00:00
Florimond Manca
2c2d49760d
Force compiling 'regex' from source ( #642 )
2019-12-16 22:26:47 +01:00
Tom Christie
0783baea3e
Disable HTTP/2 strict header validation ( #637 )
2019-12-16 12:19:25 +00:00
Florimond Manca
c337938af5
asyncio: Don't wait for the stream to close ( #640 )
...
* Don't wait for stream_writer to close
* Add comment on why wait_closed() is not called
2019-12-16 12:11:58 +00:00
Arkie
4bb69e3e3e
Allow explicit Content-Type to take precedence ( #633 )
2019-12-13 10:49:15 +00:00
Tom Christie
b847ab07a3
Version 0.9.4 ( #631 )
2019-12-13 10:44:02 +00:00
Tom Christie
52c2c9762f
Bump up flow control defaults ( #629 )
...
* Bump up flow control defaults
* Linting
* Simplify mock HTTP/2 stream in tests
2019-12-12 11:57:53 +00:00
Tom Christie
499de51f2b
Keep-alive timeouts. ( #627 )
...
* Add .time() to backend
* Add connection timeouts
* Add test case for keep alive timeouts
* Update httpx/dispatch/connection_pool.py
Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>
* Cleanups from review
* Use .expires_at, rather than .timeout_at
2019-12-12 11:52:49 +00:00
Tom Christie
77da6db8e8
Fix typo on "URLs" ( #630 )
2019-12-12 12:13:25 +01:00
Tom Christie
1d25bd58a8
Ensure H2 state is only accessed by the connection, not per-stream. ( #628 )
...
* Ensure H2 state is only accessed by the connection, not per-stream
* Formatting tweak
2019-12-12 10:40:12 +00:00
Tom Christie
869714fbf5
Drop unused methods from BaseEvent ( #626 )
2019-12-11 12:31:05 +00:00
Tom Christie
00a875db93
Refactor get_semaphore ( #625 )
2019-12-11 12:30:56 +00:00
Tom Christie
66e0f4b6f8
Tweak backport_start_tls implementation, and add 'nocover'. ( #622 )
2019-12-09 18:30:00 +00:00
Tom Christie
02d16bfb34
Trivial-case test for response.elapsed
2019-12-09 17:12:20 +00:00
Tom Christie
3124a38123
Minor config cleanup ( #621 )
2019-12-09 10:59:55 +00:00
Florimond Manca
e95111ac07
Add OpenConnection base class ( #616 )
...
* Add OpenConnection base class
* Move is_http2 property around
2019-12-09 11:34:02 +01:00