Commit Graph

653 Commits

Author SHA1 Message Date
Tom Christie
6e40c1b26a
Version 0.12 (#852)
* Version 0.12

* Update docs to reference 0.12
2020-03-09 10:18:34 +00:00
Tom Christie
970886629d
Version 0.12 (#849)
* Version 0.12

* Tweak whicespacing
2020-03-06 09:10:50 +00:00
Tom Christie
ae45c23cc5
Do not mark wheel as universal (#851) 2020-03-05 12:56:47 +00:00
Evan Lurvey
707e54c484
Enable NO_PROXY environment variable support (#835)
* Enabling NO_PROXY env support

* Enabling NO_PROXY env var support and writing tests

* Update tests/client/test_proxies.py

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update tests/client/test_proxies.py

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-03-02 16:51:34 +01:00
Tom Christie
3333152b54
Don't support broken dict-of-dicts case for data argument (#811) 2020-03-02 10:34:04 +00:00
Florimond Manca
7256366ba9
Revamp docs on Client instances (#836)
* Revamp docs on Client instances

* Apply suggestions from code review

Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>

* Reword 'Why use a Client?' section

* Apply suggestions from code review

Co-Authored-By: Hugo van Kemenade <hugovk@users.noreply.github.com>

Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>
2020-03-01 21:38:01 +01:00
Yeray Diaz Diaz
112fb9c07d
Remove proxies from Request docstring (#839) 2020-03-01 20:34:16 +01:00
Florimond Manca
53804173bb
Drop backend parameter on AsyncClient (#791)
* Drop backend parameter on AsyncClient

* Fix master merge

Co-authored-by: Tom Christie <tom@tomchristie.com>
2020-02-27 20:42:18 +00:00
Tom Christie
2714f32238
Close proxy dispatch classes on Client.close() (#826) 2020-02-27 20:41:28 +00:00
zueve
19555f6103
Forward cert param to SSLConf if verify=False (#796) 2020-02-27 11:32:10 +00:00
Piotr Staroszczyk
50d337e807
When setting headers, fallback to utf-8 if no encoding is specified yet. (#820)
* Headers: fallback to utf8 encoding

* Headers.__setitem__: use utf8 only if encoding is not set
2020-02-24 12:29:51 +00:00
Piotr Staroszczyk
efe9f61bc2
Drop RedirectLoop exception (#819)
* drop RedirectLoop exception

* tests is package to allow run it easly

* bring back test for redirect loop
2020-02-24 10:09:52 +00:00
Tom Christie
db33c071e1
Add 'chat' to docs (#818) 2020-02-19 11:38:14 +00:00
Primož Godec
3e12fd0656
Adding NetworkError to __init__ (#814) 2020-02-12 15:19:48 +00:00
George Kettleborough
b3db9ff0b6
Add Auth.requires_response_body attribute (#803)
* Add Auth.requires_response_body attribute

If set then responses are read by the client before being sent back into the auth flow

* Update tests and docs

* PR fixes

* Change example methods
2020-02-10 12:10:11 +00:00
Colin Bounouar
cfe2278096
Document that iter_* methods are synchronous (#807) 2020-02-06 13:40:42 +01:00
Florimond Manca
6614831739
Use a base_url in app dispatcher examples (#799) 2020-02-03 13:05:56 +01:00
Florimond Manca
82dc6f32f8 Switch to private module names (#785)
* Rename modules

* Update names in package

* Fix tests

* Review docs
2020-01-28 14:34:43 +00:00
Tim Gates
c2eb0bd40f Fix simple typo: conncurrent -> concurrent (#793)
Closes #792
2020-01-26 01:24:41 -05:00
Jung Sang-jun
b1e99a5cf9 Fix ProxyMode for code in dispatch/proxy_http (#788)
FORWARD_ONLY seems correct
2020-01-22 10:50:06 +00:00
Yeray Diaz Diaz
b23420392e
Detect credentials in proxy URLs and create Proxy-authorization header (#780)
* Detect auth in proxy URLs and create Proxy-authorization header

* Add credentials and SOCKS details to proxy documentation

* Use URL.copy_with to remove credentials from URL
2020-01-20 13:50:50 +00:00
Tom Christie
b128bfaf21
Version 0.11.1 (#773)
* Version 0.11.1

* Update changelog

* Update CHANGELOG.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-01-17 21:31:56 +00:00
Tom Christie
1f8fb28d93
Handle redirect with malformed Location headers missing host. (#774) 2020-01-17 11:42:51 +00:00
Tom Christie
5a63540e8a
Fix for streaming a redirect response body with allow_redirects=False (#766) 2020-01-17 09:45:37 +00:00
Tom Christie
be82404168
Fix urllib3 proxy instantiation (#763) 2020-01-14 14:09:08 +00:00
Florimond Manca
7d84408cda Add an async example to intro snippets (#750) 2020-01-14 09:01:09 +00:00
Tom Christie
780d1843ca
Support both zlib and deflate encodings (#758)
* Support both zlib and deflate encodings

* Helpful test docstrings
2020-01-14 09:00:52 +00:00
Hugo van Kemenade
956129fbf7 Add docs and repo to project_urls metadata (#753)
* Add docs and repo to project_urls metadata

For programmatic access to metadata on PyPI.

* Add Trove classifier: Python 3 Only
2020-01-13 10:26:31 +00:00
Francesco Pongiluppi
7f0e791f9d Fix syntax highlighting (#757)
Fixes syntax highlighting in quickstart documentation
2020-01-13 10:26:00 +00:00
Florimond Manca
bdfabe1e9a Setup custom domain (#751) 2020-01-11 09:38:09 +00:00
wynnw
b7c0d3446c Fix typo on "synonyms" (#748) 2020-01-10 23:46:31 +01:00
Mason Hall
b112b23152 Fix typo in async.md (#747) 2020-01-10 18:31:43 +01:00
Jakob Jul Elben
918c55de90 Update api.py (#745) 2020-01-09 18:10:06 +00:00
Luís Gustavo
c225e95b1d Fix typo in 'Streaming responses' docs (#744) 2020-01-09 12:23:33 +00:00
Tom Christie
7b576fae79
Update CHANGELOG.md 2020-01-09 10:25:23 +00:00
Tom Christie
367bff621c Use www.python-httpx.org domain 2020-01-09 09:49:25 +00:00
Tom Christie
d515e4b1aa Fix repo URL 2020-01-09 09:45:54 +00:00
Tom Christie
2c5fdc51f4
Version 0.11.0 (#737)
* Version 0.11.0

* Update CHANGELOG.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update CHANGELOG.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update CHANGELOG.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Bump status to beta

* Update release date to today

* Update changelog

* Use www.python-httpx.org domain

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-01-09 09:35:56 +00:00
Tom Christie
97807bf607 Link to changelog 2020-01-09 09:22:54 +00:00
Tom Christie
b932d94d99 Use www.python-httpx.org domain 2020-01-09 09:18:32 +00:00
Tom Christie
2038919b7e
Proposed 0.11 docs (#727)
* Proposed 0.11 docs

* Add async section and link in

* Update docs/advanced.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/quickstart.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Docs updates

* Use context-managed client instances in examples

* Update README with links to docs site, rather than to .md documents

* "99% test coverage"

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

* Add Client.close method to API docs

* Update docs/async.md

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-01-08 12:51:52 +00:00
Tom Christie
eac4b9ba74
Improve docstring for PoolLimits (#712)
* Improve docstring for PoolLimits

* Linting for docstring
2020-01-08 12:33:35 +00:00
Tom Christie
ee37a762ef
Reintroduce sync API. (#735)
* BaseClient and AsyncClient

* Introduce 'httpx.Client'

* Top level API -> sync

* Top level API -> sync

* Add WSGI support, drop deprecated imports

* Wire up timeouts to urllib3

* Wire up pool_limits

* Add urllib3 proxy support

* Pull #734 into sync Client

* Update AsyncClient docstring

* Simpler WSGI implementation

* Set body=None when no content

* Wrap urllib3 connection/read exceptions
2020-01-08 12:31:50 +00:00
Yurii Ohorodnik
387f04732b Fixed redirect loop (#734)
* fixed redirect loop

* linted with flake8

* linted with flake8
2020-01-07 16:13:06 +00:00
Tom Christie
c842c8ff20
proxies_to_dispatchers -> get_proxy_map (#733) 2020-01-07 13:37:57 +00:00
Tom Christie
12dd157fea
Public Auth API (#732)
* Public Auth API

* Minor docs tweak

* Request.aread and Request.content

* Support requires_request_body

* Update tests/models/test_requests.py

Co-Authored-By: Florimond Manca <florimond.manca@gmail.com>

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
2020-01-07 13:20:23 +00:00
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