Bin Liu
12be5c44ca
add socks5h proxy support ( #3178 )
...
Signed-off-by: bin liu <liubin0329@gmail.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2024-10-29 14:10:33 +00:00
Joe Marshall
e9cabc8e1d
made dependencies on certifi and httpcore only load when required ( #3377 )
...
Co-authored-by: Tom Christie <tom@tomchristie.com>
2024-10-29 13:18:39 +00:00
Tom Christie
eeb5e3c2a3
Cleanup unneccessary test case ( #3375 )
2024-10-28 17:38:33 +00:00
Tom Christie
5dda2aa306
Just use default safe=... characters for urlescape ( #3376 )
2024-10-28 17:38:16 +00:00
Tom Christie
ba2e51215e
Review urlescape percent-safe set, and use + behavior for form spaces. ( #3373 )
2024-10-28 16:19:59 +00:00
Tom Christie
d293374b66
Review URL percent escaping sets, from whatwg. ( #3371 )
2024-10-28 15:06:10 +00:00
BERRADA-Omar
9fd6f0ca66
Ensure JSON representation is compact. #3363 ( #3367 )
...
Co-authored-by: Tom Christie <tom@tomchristie.com>
2024-10-28 14:40:22 +00:00
Tom Christie
8e36f2bc68
Introduce new SSLContext API & escalate deprecations. ( #3319 )
...
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
2024-10-28 14:30:08 +00:00
Polina Beskorovainaia
49d74a2e7f
Clarified error when header value is None ( #3312 )
...
Co-authored-by: Zanie Blue <contact@zanie.dev>
2024-09-26 18:01:47 +01:00
Tom Christie
7c0cda153d
Improve InvalidURL error message. ( #3250 )
2024-07-26 09:36:03 +01:00
Tom Christie
db9072f998
Add URL parsing tests from WHATWG ( #3188 )
...
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
2024-06-13 14:46:36 +01:00
Tom Christie
a7092af2fd
Resolve queryparam quoting ( #3187 )
2024-05-03 01:09:08 +01:00
dependabot[bot]
7354ed70ce
Bump the python-packages group with 8 updates ( #3156 )
2024-04-09 21:38:43 +01:00
Michiel W. Beijen
392dbe45f0
Add support for zstd decoding ( #3139 )
...
This adds support for zstd decoding using the python package zstandard.
This is similar to how it is implemented in urllib3. I also chose the
optional installation option httpx[zstd] to mimic the same option in
urllib3.
zstd decoding is similar to brotli, but in benchmarks it is supposed to
be even faster. The zstd compression is described in RFC 8878.
See https://github.com/encode/httpx/discussions/1986
Co-authored-by: Kamil Monicz <kamil@monicz.dev>
2024-03-21 10:17:15 +00:00
T-256
0006ed0547
format ( #3131 )
...
Co-authored-by: T-256 <Tester@test.com>
2024-03-01 19:49:23 +00:00
Alex
6d852d319a
Fix client.send() timeout new Request instance ( #3116 )
2024-02-26 16:36:58 +00:00
T-256
fc84f7f6eb
test same_origin via public api ( #3062 )
...
Co-authored-by: Tom Christie <tom@tomchristie.com>
2024-02-23 14:16:03 +00:00
T-256
e745060c75
test is_https_redirect via public api ( #3064 )
...
* test `is_https_redirect` via public api
* Update tests/test_utils.py
2024-02-23 14:11:43 +00:00
Tom Christie
cabd1c095e
Deprecate app=... in favor of explicit WSGITransport/ASGITransport. ( #3050 )
...
* Deprecate app=... in favour of explicit WSGITransport/ASGITransport
* Linting
* Linting
* Update WSGITransport and ASGITransport docs
* Deprecate app
* Drop deprecation tests
* Add CHANGELOG
* Deprecate 'app=...' shortcut, rather than removing it.
* Update CHANGELOG
* Fix test_asgi.test_deprecated_shortcut
2024-02-02 13:29:41 +00:00
Kar Petrosyan
371b6e946c
Use __future__.annotations ( #3068 )
...
* Switch to new typing style
* lint
2024-01-24 14:30:22 +00:00
T-256
4f6edf36e9
test parse_header_links via public api ( #3061 )
...
* test `parse_header_links` via public api
* add no-link test
* Update tests/test_utils.py
---------
Co-authored-by: Tom Christie <tom@tomchristie.com>
2024-01-16 10:25:02 +00:00
T-256
c7cd6aa5bd
test obfuscate_sensitive_headers via public api ( #3063 )
2024-01-16 09:53:23 +00:00
Tereza Tomcova
99cba6ac64
Fix RFC 2069 mode digest authentication ( #3045 )
...
* Fix RFC 2069 mode digest authentication
* Update CHANGELOG.md
2024-01-10 10:08:42 +00:00
Tom Christie
dd5304d3eb
Tidy up import ( #3020 )
...
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
2023-12-28 13:10:37 +00:00
Tom Christie
a11fc3849b
Cleanup URL percent-encoding behavior. ( #2990 )
...
* Replace path_query_fragment encoding tests
* Remove replaced test cases
* Fix test case to use correct hex sequence for 'abc'
* Fix 'quote' behaviour so we don't double-escape.
* Add '/' to safe chars in query strings
* Update docstring
* Linting
* Update outdated comment.
* Revert unrelated change
---------
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
2023-12-15 11:35:16 +00:00
Kar Petrosyan
3b9060ee11
Fix environment proxies ( #2741 )
...
* Add red test
* Make the test pass
* Lint
* chanelog
---------
Co-authored-by: Karen Petrosyan <92274156+karosis88@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-12-14 14:04:04 +00:00
James Braza
2318fd822c
Enabling ruff C416 ( #3001 )
...
* Enabled C416 in ruff
* Ran ruff on all files
* Ran ruff format
* Update pyproject.toml
---------
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-12-13 11:30:39 +00:00
James Braza
1e11096473
Fixed iter_text adding an empty string ( #2998 )
2023-12-11 22:34:25 +00:00
Tom Christie
90538a3b46
Ensure that ASGI 'raw_path' does not include query component of URL. ( #2999 )
2023-12-11 15:45:20 +00:00
Kar Petrosyan
f8981f3d12
Add the 'proxy' parameter and deprecate 'proxies'. ( #2879 )
...
* Add the proxy parameter and deprecate proxies
* Make the Client.proxy and HTTPTransport.proxy types the same
* Update httpx/_transports/default.py
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
* Update httpx/_transports/default.py
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
* Drop unneeded noqa
* Changelog
* update documentation
* Allow None in mounts
* typos
* Update httpx/_types.py
* Changes proxies to proxy in CLI app
* Add proxy to request function
* Update CHANGELOG.md
Co-authored-by: Tom Christie <tom@tomchristie.com>
* Update docs/troubleshooting.md
Co-authored-by: Tom Christie <tom@tomchristie.com>
* Update docs/troubleshooting.md
Co-authored-by: Tom Christie <tom@tomchristie.com>
* Lint
---------
Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: T-256 <132141463+T-256@users.noreply.github.com>
2023-12-11 17:55:52 +04:00
Tom Christie
b471f01d66
Allow URLs where username or password contains unescaped '@'. ( #2986 )
...
* Add test cases for userinfo in URL
* Resolve failing test cases
* Update CHANGELOG.md
* Update CHANGELOG.md
2023-12-07 10:08:14 +00:00
Tom Christie
5b5f6d8e17
Moving test cases into 'test_url.py' ( #2982 )
...
* Moving test cases into 'test_url.py'
* Move test_url to test_basic_url
* Linting
* Move TypeError test case. Move basic httpx.URL cases.
* Linting
* Merge invalid URL cases
* Move percent encoding test cases
* Move remaining test cases
* Linting
* Add missing test cases
2023-12-05 15:36:05 +00:00
Tom Christie
724eced022
Reorganise tests in 'test_url.py' ( #2981 )
...
* Reorganise tests in 'test_url.py'
* Linting
2023-12-05 13:24:34 +00:00
T-256
fd60b1815c
Ruff linter: Use the default line-length ( #2922 )
...
Co-authored-by: Tester <Tester@test.com>
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
2023-11-29 13:28:31 +04:00
Petr Belskiy
87f39f12c9
add missing type hints to __init__(...) ( #2938 )
...
* add missing type hints to __init__
https://peps.python.org/pep-0484/
* add info to changelog
* Update CHANGELOG.md
* Update CHANGELOG.md
---------
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-11-17 17:58:51 +04:00
Michał Górny
f653b2f0cf
Inline Brotli samples in tests ( #2935 )
...
Inline the compressed Brotli samples in tests to make them independent
of Brotli implementation. This makes it possible to run the test suite
both against Brotli and brotlicffi.
Fixes #2906
2023-11-10 15:07:05 +00:00
Tom Christie
1d73150c1f
Cleanup response.json() method ( #2911 )
...
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
2023-10-31 10:10:16 +00:00
robinaly
e63b6594f2
Fix encode host ( #2886 )
...
* Fix requiring dot literal rather than any character in IPv4
* Add check to prevent future errors
2023-10-10 12:03:47 +01:00
xzmeng
59df8190a4
Raise ValueError on Response.encoding being set after Response.text has been accessed ( #2852 )
...
* Raise ValueError on change encoding
* Always raise ValueError for simplicity
* update CHANGELOG.md
2023-09-19 08:54:32 +01:00
Y.D.X
e4241c6155
Drop private imports from test_proxies.py ( #2850 )
2023-09-16 21:58:56 +01:00
Musale Martin
88e8431437
Add cookies to the retried request when performing digest authentication. ( #2846 )
...
* Add cookies from the response to the retried request
* Conditionally add cookies from the response
* Fix failing auth module tests
* Fix linting error
* Add tests to check set cookies from server
2023-09-15 10:52:11 +01: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
Zanie
18d7721c38
Use Mozilla documentation instead of httpstatuses.com for HTTP error reference ( #2768 )
2023-07-13 15:17:07 -05:00
Zanie Adkins
920333ea98
Always encode forward slashes as %2F in query parameters ( #2723 )
...
* Always encode forward slashes as `%2F` in query parameters
* Revert inclusion of "%"
This is expected to fail tests due to double escaping
* Update `urlencode`
---------
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-06-09 10:06:56 +01:00
Nik
a682f6f1c7
Fix exception suppression in asgi transport ( #2669 )
2023-05-21 01:17:23 +01:00
Peter Lazorchak
abb994c0c2
Ensure all WSGITransport environs have a SERVER_PROTOCOL ( #2708 )
2023-05-19 11:38:18 +01:00
Tom Christie
ee432c0d30
Fix for gen-delims escaping behaviour in path/query/fragment ( #2701 )
2023-05-09 14:20:12 +01:00
Tom Christie
26dc39213a
Additional context in InvalidURL exceptions ( #2675 )
2023-04-20 12:17:44 +01:00
Florimond Manca
cca62060cb
Drop private imports from test_decoders.py ( #2570 )
...
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-04-19 14:16:29 +01:00