Tom Christie
8ceb34f486
Version 0.15.2 ( #1314 )
...
* Fix response.elapsed
* Version 0.15.2
2020-09-23 11:28:22 +01:00
Tom Christie
befa57c6f9
Fix response.elapsed ( #1313 )
2020-09-23 11:26:12 +01:00
Tom Christie
d25f2bfeff
Fix stream unsetting auth ( #1312 )
...
* Fix ASGITransport path escaping
* Add failing test case for auth with streaming
* Fix .stream setting auth=None
2020-09-23 11:25:54 +01:00
emlazzarin
257b8fab6a
update arg name to max_keepalive_connections ( #1309 )
...
The old name `max_keepalive` was removed recently, so this updates the docs.
2020-09-23 10:42:21 +01:00
Tom Christie
27e67b32e9
Version 0.15.1 ( #1308 )
...
* Update CHANGELOG.md
* Update __version__.py
2020-09-23 11:12:50 +02:00
Tom Christie
e53f995994
Fix ASGITransport path escaping ( #1307 )
2020-09-23 09:37:19 +01:00
Tom Christie
c923f1af91
Update docs for 0.15 ( #1306 )
2020-09-22 11:57:14 +01:00
Tom Christie
a63b038267
Include 0.15.0 release date. ( #1305 )
2020-09-22 11:51:52 +01:00
Tom Christie
5d11756585
Include curio support in CHANGELOG ( #1304 )
2020-09-22 11:49:33 +01:00
Tom Christie
f932af9172
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>
2020-09-22 11:44:28 +01:00
Tom Christie
8e4a8a1c73
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
2020-09-21 11:35:25 +01:00
Tom Christie
f3c29416f1
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=...)
2020-09-21 11:19:19 +01:00
Tom Christie
8ee08afe96
Update _client.py ( #1300 )
2020-09-18 14:17:03 +01:00
Tom Christie
d8050ed753
Neater Host header logic on redirects ( #1299 )
2020-09-18 12:00:43 +01:00
Tom Christie
ed27682686
NetRC lookups should use host, not host+port ( #1298 )
2020-09-18 11:50:13 +01:00
Tom Christie
354c4cac1f
Refactor content streams ( #1296 )
...
* Refactor content_streams internally
* Tidy up multipart
* Use ByteStream annotation internally
2020-09-18 10:50:15 +01:00
Tom Christie
fbb21fb1ae
Drop ContentStream ( #1295 )
...
* Drop ContentStream
2020-09-18 08:41:09 +01:00
Tom Christie
e1f7791e97
Requests from transport API ( #1293 )
...
* Refactoring to support instantiating requests from transport API
* Minor refactoring
2020-09-17 11:59:42 +01:00
Tom Christie
09f94edd93
encode -> encode_request ( #1292 )
2020-09-17 09:33:36 +01:00
Tom Christie
ff0febbaa9
Update README.md ( #1291 )
...
* Update README.md
* Update index.md
2020-09-17 09:11:41 +01:00
Stephen Brown II
a394df59da
Fix function name in event hooks docs ( #1290 )
2020-09-16 09:45:20 +08:00
Tom Christie
feb404f86b
Seperate content=... and data=... parameters ( #1266 )
...
* Seperate content=... and data=... parameters
* Update compatibility.md
2020-09-15 13:36:10 +01:00
Tom Christie
54f7708e2b
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
2020-09-15 12:05:39 +01:00
Tom Christie
d0fe113945
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>
2020-09-15 11:20:19 +01:00
Tom Christie
2d6c30d061
Refactor test_auth.py to use MockTransport class. ( #1288 )
...
* Use tests.utils.MockTransport
* Use tests.utils.MockTransport
2020-09-14 17:44:05 +01:00
cdeler
62c6c1c8ad
Refactoring of models api ( #1284 )
...
* Made Request.prepare private (i.e. renamed it to _prepare)
* Added bytes as a new possible QueryParamTypes
2020-09-14 12:16:45 +01:00
Tom Christie
b58bd8e8e5
Pin flake8-pie ( #1286 )
...
* Pin `flake8-pie`
* Update requirements.txt
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-09-12 19:41:47 +01:00
Tom Christie
c2afd2d9bf
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>
2020-09-12 11:16:10 +01:00
Tom Christie
8a5050ea41
Refactor to use isinstance(..., typing.Iterator) ( #1282 )
2020-09-11 14:37:51 +01:00
Tom Christie
5ee6135256
Support Response(content=<bytes iterator>) ( #1265 )
...
* Support Response(content=<bytes iterator>)
* Update test for merged master
2020-09-11 10:28:18 +01:00
Bart
4bd08bed22
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>
2020-09-10 21:22:14 +02:00
Tom Christie
6006721c6d
Minor decoder refactoring. ( #1276 )
...
* Switch auth/redirect methods to follow flow of execution better
* Drop response.decoder property
* Decoder -> ContentDecoder
* Decoder -> ContentDecoder
2020-09-10 15:10:31 +01:00
Tom Christie
59074c7bc0
Progress examples ( #1272 )
...
* Progress examples
* Update advanced.md
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-09-10 12:28:08 +01:00
Tom Christie
930f3773e2
Switch auth/redirect methods to follow flow of execution better ( #1273 )
2020-09-10 12:44:36 +02:00
cdeler
ed16eb3a3d
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>
2020-09-10 12:16:00 +03:00
Tom Christie
4d950e5780
Swap auth/redirects ordering ( #1267 )
...
* Internal refactoring to swap auth/redirects ordering
* Test for auth with cross domain redirect
2020-09-10 09:12:05 +01:00
Florimond Manca
016e4ee210
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>
2020-09-09 14:37:20 +01:00
cdeler
15187e7c21
Fixed test_multiple_set_cookie ( #1270 )
...
* Fixed test_multiple_set_cookie
* Update test_cookies.py
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-09-09 10:01:39 +01:00
Tom Christie
a783fe5758
Drop request.timer attribute. ( #1249 )
...
* Drop request.timer attribute
* Response(..., elapsed_func=...)
2020-09-07 09:06:14 +01:00
cdeler
78f24203ce
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>
2020-09-06 14:52:37 +03:00
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