Tom Christie
c5037f06e4
Drop per-request 'cert'/'verify'/'trust_env', and 'stream=bool' arguments ( #730 )
2020-01-07 12:24:26 +00:00
Andrés Álvarez
2b92a78c41
Drop Origin from public API ( #688 )
...
- Drop the url.origin property.
- Drop Origin from the top-level export.
- Use origin = Origin(url) in our internal usage, rather than
url.origin.
Closes #656
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-01-07 10:39:47 +00:00
Tom Christie
f17ab37b2f
Prep for introducing SyncClient ( #713 )
...
* Reorganize method ordering in client
* Move 'request'
* Use 'httpx.Proxy' for proxy configuration
2020-01-07 10:27:01 +00:00
Florimond Manca
e1afbfa7b4
Wrap network errors in HTTPX-specific exceptions ( #707 )
2020-01-07 10:01:11 +00:00
Tom Christie
e19bd9bc4b
Dispatcher -> AsyncDispatcher ( #725 )
...
* Dispatcher -> AsyncDispatcher
* Fix invalid renamings
* Fix invalid renamings
2020-01-06 12:08:14 +00:00
Tom Christie
6ac49dacdd
Drop run and run_in_threadpool ( #710 )
...
* Drop run and run_in_threadpool
* Fix server restart errors
* Re-introduce 'sleep' as a concurrency test utility
* Simpler test concurrency utils
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-01-06 11:14:43 +00:00
Florimond Manca
bd57b650a8
Release max_connections for keepalive connections when closing the connection pool ( #721 )
2020-01-06 11:13:06 +00:00
Kousik Mitra
0ed0314569
Raise an exception in DigestAuth if non-replayable request is passed ( #685 )
...
* DigestAuth will raise exception if non-replayble request is passed #670
* Added new exception RequestBodyUnavailble exception to raise non replayable request error #670
* Changed RedirectBodyUnavailable exception to RequestBodyUnavailble to raise non-replayable exception #670
* fixed class declaration
* Added RequestBodyUnavailable exception. Imported it in module level
* Added RequestBodyUnavailable in the module list
* Code reformat
* Added Test to check if exception is raising if non-replayble request body is passed to DigestAuth #670
2020-01-04 10:00:34 +01:00
Florimond Manca
bc6163c55a
Record history of requests made during authentication ( #718 )
...
* Record history of requests made during authentication
* Add asserts on digest auth history
Co-Authored-By: Gaurav Dhameeja <gdhameeja@gmail.com>
2020-01-03 22:59:16 +01:00
Florimond Manca
910aa9094c
Repurpose RedirectBodyUnavailable as RequestBodyUnavailable ( #690 )
2020-01-03 22:25:55 +01:00
Florimond Manca
ff44d2d1b8
Fix typo in 'Redirection and History' docs ( #719 )
2020-01-03 21:14:13 +00:00
Tom Christie
79a9748ae6
Load SSL Context on init ( #709 )
2020-01-02 16:52:23 +00:00
Tom Christie
f5eaec7ab3
More coverage improvements ( #711 )
...
* More coverage improvements
* Drop redundant 'sleep' usage in test utils
2020-01-02 15:33:26 +00:00
Tom Christie
11e7604d1a
Sync streaming interface on responses ( #695 )
...
* Sync streaming interface on responses
* Fix test case
* Test coverage for sync response APIs
* Address review comments
2020-01-02 12:56:11 +00:00
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