Commit Graph

269 Commits

Author SHA1 Message Date
Tom Christie
0dd72fce4a Make async dependencies optional. 2023-09-20 09:46:39 +01:00
xzmeng
053bc57c37
fix a typo in docs/logging.md (#2830) 2023-08-29 11:27:23 +02:00
Iurii Pliner
b40c04dfa6
Drop support for Python 3.7 (#2813)
* Drop Python 3.7 support

* Fix lint

* Changelog
2023-08-09 10:02:28 +01:00
Trim21
9415af643f
Make raise_for_status chainable (#2776)
* merge upstream

* lint

* Update test_async_client.py

* update docs

* add example

* Update docs/quickstart.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

* Update CHANGELOG.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

* Update docs/quickstart.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

---------

Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-08-01 10:22:58 +01:00
Kar Petrosyan
55b8669acb
Add Hishel into the Third Party Packages (#2799) 2023-07-31 16:40:10 +01:00
Zanie
18d7721c38
Use Mozilla documentation instead of httpstatuses.com for HTTP error reference (#2768) 2023-07-13 15:17:07 -05:00
Trim21
f115ce4e09
docs: upload progress (#2725)
* upload progress

* typo

* typo

* Update docs/advanced.md

* Update advanced.md

* Update docs/advanced.md

Co-authored-by: Kar Petrosyan <92274156+karosis88@users.noreply.github.com>

---------

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Kar Petrosyan <92274156+karosis88@users.noreply.github.com>
2023-07-13 15:55:41 +03:00
Johnny Lim
2e2949c8ea
Fix sample in quickstart.md (#2747) 2023-06-22 09:44:44 +01:00
Trond Hindenes
6d183a87e1
async recommendations (#2727)
* async recommendations

* better

* Update docs/async.md

Co-authored-by: Tom Christie <tom@tomchristie.com>

* added async recommendation tweak

---------

Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-06-15 12:20:28 +03:00
Florimond Manca
859038a9e6
Add httpx-sse to Third Party Packages (#2683) 2023-04-28 08:52:16 +02:00
Tom Christie
f1157dbc41
Use standard logging style (#2547)
* Use standard logging style

* Add docs for logging

* Drop out-of-date HTTPX_LOG_LEVEL variable docs
2023-03-20 11:30:11 +00:00
Tom Christie
59914c7690
Add NetRCAuth() class. (#2535)
* NetRCAuth class

* Add docs for httpx.NetRCAuth()

* Drop failing cross-domain test for NetRCAuth()

* Update tests

* Update httpx/_auth.py

* Add tests for netrc file with no password
2023-01-12 11:27:46 +00:00
Tom Christie
57daabf673
Drop rfc3986 requirement. (#2252)
* Drop RawURL

* First pass at adding urlparse

* Update urlparse

* Add urlparse

* Add urlparse

* Unicode non-printables can be valid in IDNA hostnames

* Update _urlparse.py docstring

* Linting

* Trim away ununsed codepaths

* Tweaks for path validation depending on scheme and authority presence

* Minor cleanups

* Minor cleanups

* full_path -> raw_path, forr internal consistency

* Linting fixes

* Drop rfc3986 dependency

* Add test for #1833

* Linting

* Drop 'rfc3986' dependancy from README and docs homepage

Co-authored-by: Thomas Grainger <tagrain@gmail.com>
2023-01-10 10:36:15 +00:00
Simon K
deb904dd15
remove chunk_size from api docs for iter_lines variants (#2464)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-11-29 15:55:38 +00:00
Ben Falk
8e5e3b871b
update requests compatibility docs on query and form params (#2461) 2022-11-25 12:05:46 +00:00
František Nesveda
a2a69e4bf7
Mention default timeout differences from Requests in compatibility docs (#2433)
I was recently migrating a project from Requests to HTTPX, and I stumbled a bit on the default socket timeouts being different between the two, which I haven't seen explicitly mentioned anywhere.

This adds a mention of those differences to the compatibility section, feel free to edit it or move it around as you choose.
2022-11-07 15:25:49 +01:00
Fred Thomsen
5af6123fff
Update docs to reflect supported python versions (#2338)
Replaces Python 3.6 references with Python 3.7.

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2022-08-16 17:20:35 -05:00
Florimond Manca
93de1980fa
Expand docs about retries (#2311)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-07-29 13:21:58 +01:00
Ofek Lev
9884965233
Update link to trustme (#2318) 2022-07-25 17:23:08 +08:00
Florimond Manca
3a82176f1f
Rework docs structure (#2308) 2022-07-21 08:43:18 +02:00
Florimond Manca
943a942836
Fix link to "http2 explained" (#2307) 2022-07-18 14:34:06 +02:00
Daniel Holth
aad60a4f12
add [chunk_size] for a?iter_.* methods (#2281)
```
    def iter_bytes(
        self, chunk_size: typing.Optional[int] = None
    ) -> typing.Iterator[bytes]:
```
2022-06-24 14:36:45 +01:00
Tom Christie
1c33a2854e
Make charset auto-detection optional. (#2165)
* Add Response(..., default_encoding=...)

* Add tests for Response(..., default_encoding=...)

* Add Client(..., default_encoding=...)

* Switch default encoding to 'utf-8' instead of 'autodetect'

* Make charset_normalizer an optional dependancy, not a mandatory one.

* Documentation

* Use callable for default_encoding

* Update tests for new charset autodetection API

* Update docs for new charset autodetection API

* Update requirements

* Drop charset_normalizer from requirements
2022-05-23 16:27:32 +01:00
Kieran Klukas
940d61b239
Removed curio from async.md (#2240) 2022-05-23 11:09:15 +02:00
nyuszika7h
782f507b63
docs: Fix proxy examples (#2183)
Per https://www.python-httpx.org/compatibility/#proxy-keys, there should
always be a `://` after the protocol. The given examples raise an
exception when used as-is.

Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-05-05 13:11:18 +01:00
Ninzero
2b26412868
Clarify custom auth (#2202) 2022-05-04 11:11:53 +02:00
Johannes
781076cb63
Fix raise_for_status exception docs (#2159)
Closes #2126
2022-04-01 16:06:24 +01:00
Ofek Lev
67c297069f
Drop EOL Python 3.6 (#2097)
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2022-03-30 17:31:05 +02:00
Jorge
f7a024cee3
Corrected typo in advanced.md (#2155) 2022-03-30 16:58:00 +02:00
Dan Claudiu Pop
43a1c1c826
Add robox to third party packages doc (#2113)
* Add robox to third party packages doc

* Update third_party_packages.md
2022-03-08 10:53:15 +00:00
Ben Fasoli
6820b1d9c5
Fix invalid max_keepalive_connections argument name (#2094)
The argument to `httpx.Limits` is named `max_keepalive_connections` but is referenced as `max_keepalive` in the docs.
2022-02-25 14:10:35 +00:00
Udasi Tharani
2a08edc471
adding keepalive_expiry param to docs and docstring (#2090) 2022-02-22 10:40:14 +00:00
Tom Christie
2072aa2361
Docs tweaks (#2075) 2022-02-09 16:05:20 +00:00
iscai-msft
7d3a5347a9
update eerror docs to use StreamClosed instead of old ResponseClosed (#1913)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-02-09 11:53:49 +00:00
toppk
4f8068a7ad
update docstring/docs for transport using request/response models (#2070)
* update docstring/docs for transport based on pull #1840

* Update httpx/_transports/base.py

* lint'd

Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-02-08 14:58:08 +00:00
Vytautas Liuolia
d299e6ff59
Do not recommend the deprecated data= kwarg for passing bytes. (#2044)
(`data=` is meant for sending form data.)
2022-01-23 21:37:27 +01:00
Tom Christie
8dc9b6bd59
SOCKS proxy support (#2034) 2022-01-19 14:58:19 +00:00
Denis Laxalde
3eaf69a772
Drop mention of backend selection for AsyncHTTPTransport() in docs (#2019)
There is no 'backend' parameter to AsyncHTTPTransport and it seems that
the backend is detected automatically for anyio as it is for other async
libraries.
2022-01-10 09:39:13 +00:00
Kian Meng, Ang
82ba15b521
Fix typos (#1968) 2021-12-14 15:04:01 +01:00
Tom Christie
b4f60694eb
Version 0.21 release notes (#1938) 2021-11-15 14:35:09 +00:00
Tyler Chamberlain
da8f959af0
Expand docs note for async custom handler responses (#1916)
* Expand note for async custom handler responses

Custom response handlers need to run `response.read()` before they can read the content of the response. However when using an AsyncClient this will produce an error of `RuntimeError: Attempted to call a sync iterator on an async stream.`. Took me some digging to figure out I just needed to use `response.aread()` here instead of `response.read()` so figured I would an MR with an expansion on the note for anyone else.
Thanks!

* Update advanced.md
2021-11-01 11:39:18 +00:00
Tom Christie
35164b7a64
Version 0.20 (#1890)
* Version 0.20

* Add date to changelog

* Freeze charset-normalizer to a known version for testing consistency
2021-10-13 10:43:58 +01:00
Marcelo Trylesinski
deb1a2b921
Update index.md (#1883)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2021-10-06 13:26:49 +01:00
Tom Christie
e1abaf146f
Tidy up the formatting of HTTP/2 requests (#1860)
* Tidy up the formatting of HTTP/2 requests

* Black linting
2021-09-14 13:36:22 +01:00
Tom Christie
7e01677f0a
List 'click' and 'rich' in the project dependencies (#1858) 2021-09-14 10:44:07 +01:00
Tom Christie
ee9250d60b
Add cli support (#1855)
* Add cli support

* Add setup.py

* Import main to 'httpx.main'

* Add 'cli' to requirements

* Add tests for command-line client

* Drop most CLI tests

* Add test_json

* Add test_redirects

* Coverage exclusion over _main.py in order to test more clearly

* Black formatting

* Add test_follow_redirects

* Add test_post, test_verbose, test_auth

* Add test_errors

* Remove test_errors

* Add test_download

* Change test_errors - perhaps the empty host header was causing the socket error?

* Update test_errors to not break socket

* Update docs

* Update version to 1.0.0.beta0

* Tweak CHANGELOG

* Fix up images in README

* Tweak images in README

* Update README
2021-09-14 09:44:43 +01:00
Tom Christie
47266d763b
Switch follow redirects default (#1808)
* Switch default on allow_redirects to False

* allow_redirects -> follow_redirects

* Update follow_redirects default in top-level API

* Update docs on follow_redirects
2021-09-13 13:21:22 +01:00
TAHRI Ahmed R
ecbece178f
📝 Docs patch following PR #1791 section compatibility.encoding (#1812)
* 📝 Docs patch following PR #1791 section compatibility.encoding

Reintroducing charset detection

* 📝 Amend sentence in 3080a9d66e

Co-authored-by: Tom Christie <tom@tomchristie.com>
2021-08-31 13:44:12 +01:00
Tom Christie
0d7c4caada
Version 0.19.0 (#1809)
* Update CHANGELOG

* Update CHANGELOG

* Version 0.19.0

* Update CHANGELOG
2021-08-19 12:37:25 +01:00
Tom Christie
2d9c3580e0
Switch event hooks to also run on redirects. (#1806)
* Switch event hooks to also run on redirects

* Bump coverage

* Add pragma: no cover, because sometime ya just gotta be pragmatic

* Update docs with note about response.read()
2021-08-18 15:12:39 +01:00