Commit Graph

170 Commits

Author SHA1 Message Date
Tom Christie
3f51392bea
Add response.next_request (#1334)
* Add response.next_request

* Add response.next_request

* Add response.next_request to the docs
2020-10-01 13:52:03 +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
c923f1af91
Update docs for 0.15 (#1306) 2020-09-22 11:57:14 +01:00
Tom Christie
fbb21fb1ae
Drop ContentStream (#1295)
* Drop ContentStream
2020-09-18 08:41:09 +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
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
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
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
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
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
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
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
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
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
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
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
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
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
Tom Christie
8c7729e42c
Version 0.14.0 (#1083)
* Version 0.14.0

* Update CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>

* Update CHANGELOG

* max_keepalive_connections

* Add deprecation test

* Update CHANGELOG.md

* Undate dependency pin callout

* Update expected 1.0 release date

Co-authored-by: Stephen Brown II <Stephen.Brown2@gmail.com>
2020-08-07 15:50:25 +01:00
Tom Christie
8d9dfb54fc
HTTP/2 becomes fully optional (#1140)
* HTTP/2 becomes fully optional

* Fix linting, coverage
2020-08-07 15:16:21 +01:00
Tom Christie
360b63d4f4
Document exceptions (#1138)
* Document exceptions

* Update exceptions.md
2020-08-07 14:17:49 +01:00
Tom Christie
3205536a09
Note on differences in proxy keys vs. requests (#1132)
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-08-05 19:06:03 +01:00
cdeler
7279ed4658
Raise warning if proxy key is eg. "all" instead of "all://". (#1127)
* #1105 added deprecation warning, raised when we try to use proxies={"http": ...} instead of {"http://": ...}. Updated docs and added unit, which check the warning presence

* Update tests/client/test_proxies.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>

* Update tests/client/test_proxies.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-08-05 18:41:50 +01:00
Florimond Manca
78cf16ace9
Drop HSTS Preloading (#1110)
* Drop HSTS Preloading

* Update test_client.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-05 13:05:45 +01:00
Florimond Manca
0fb28e8cab
Refine docs phrasing on proxy routing (#1124) 2020-08-03 10:29:03 +01:00
Florimond Manca
70cdd95006
Revamp proxies documentation (#1123) 2020-08-02 14:02:43 +02:00
Florimond Manca
f67e925f72
Rename PoolLimits to Limits (#1113)
* Rename PoolLimits to Limits

* Lint

Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-01 20:44:58 +01:00
Florimond Manca
26cd4f54e8
Switch to more concise Timeout parameters (#1111)
* Switch to more concise Timeout parameters

* Update docs

* Rename attributes

Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-08-01 19:59:01 +01:00
Can Sarıgöl
926a55a84f
Included create_ssl_context function to create the same context with SSLConfig and serve as API (#996)
* Included create_ssl_context function to create the same context with SSLConfig and serve as API.

* Changed create_ssl_context with SSLConfig into the client implementation and tests.

* Dropped the __repr__ and __eq__ methods from SSLConfig and removed SSLConfig using from tests

* Fixed test issue regarding cert_authority trust of ssl context

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-07-27 19:46:46 +01:00
Tom Christie
247ee0dc49
Drop private Origin model (#1070)
* Drop private Origin model

* Drop Origin from docs

* Update tests/test_utils.py

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>

* Drop full_path test

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-07-23 09:54:45 +01:00
François Voron
27b0dbc22d
Raise HTTPStatusError in raise_from_status (#1072) 2020-07-20 13:10:57 +01:00
Florimond Manca
df24a0fc96
Add "manual streaming mode" docs (#1046)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-07-07 14:37:12 +02:00
euri10
4d287956fd
Add support for multiple files per POST field (#1032)
* Changed RequestFiles type

* Changed RequestFiles type 2

* Added test for multiple files same field

* Lint

* Mypy no idea

* Added doc

* Fixed some docs typos

* Checking the right instance type and deleting the mypy ignore

* Docs clarification

* Back on images form field, with other files modified
2020-06-24 19:17:27 +02:00
Florimond Manca
0f7d644b8d
Add note on data fields in multipart form encoding (#1022)
* Add note on data fields in multipart form encoding

* Fix message
2020-06-15 20:40:17 +02:00
Yeray Diaz Diaz
3196be937a
Update contributing docs (#1011)
* Update contributing docs

* Update docs/contributing.md

Co-authored-by: Josep Cugat <jcugat@gmail.com>

* Update docs/contributing.md

Co-authored-by: Josep Cugat <jcugat@gmail.com>

* Update docs/contributing.md

Co-authored-by: Josep Cugat <jcugat@gmail.com>

Co-authored-by: Josep Cugat <jcugat@gmail.com>
2020-06-02 10:31:56 +01:00
Josep Cugat
620b0670db
Increase test coverage - take 2 (#1012)
* Fix HttpError -> HTTPError typo

* Increased test coverage

* Increase coverage threshold

* Reuse sync/async transport code in test_auth.py

* Removed close_client check inside StreamContextManager

It's never set as True when used in async

* Reuse sync/async transport code in test_redirects.py
2020-06-02 10:24:45 +01:00
Josep Cugat
8c84210555
Increased test coverage & cleanup (#1003)
* Remove unused/untested headers copy() method

Last usage was removed in #804

* Remove unused premature_close server endpoint

Last usage was removed in #804

* Increased test coverage

* Revert removal of headers copy() method

Documented and added tests for it.

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-05-30 23:22:03 +02:00
Alexander Pushkov
8ed6904646
Remove the UDS section from docs (#1009) 2020-05-30 20:43:15 +02:00
Tom Christie
bafa32aa67 Update HTTP/2 docs 2020-05-22 10:16:08 +01:00
Tom Christie
2c2c6a71a9
Version 0.13 (#971)
* Version 0.13

* Update docs to 0.13 as the latest

* Whitespacing tweak

* More explicit notes about transport API renamings

* Update changelog

Co-authored-by: florimondmanca <florimond.manca@gmail.com>
2020-05-22 09:41:02 +01:00
Florimond Manca
a58be59adb
Add note on streaming uploads (#973) 2020-05-21 16:13:16 +02:00
Tom Christie
99a5c78bbb
Update dependencies in docs (#969)
* Update dependencies in docs

* Update README.md

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>

* Update docs/index.md

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-05-21 13:43:34 +01:00