Commit Graph

1283 Commits

Author SHA1 Message Date
dependabot[bot]
35a00672dd
Bump black from 22.10.0 to 23.3.0 (#2644)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-02 10:50:53 +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
Gianni Tedesco
85c5898d8e
Change LineDecoder to match stdlib splitlines, resulting in significant speed up (#2423)
* Replace quadratic algo in LineDecoder

Leading to enormous speedups when doing things such as
Response(...).iter_lines() as described on issue #2422

* Update httpx/_decoders.py

* Update _decoders.py

Handle text ending in `\r` more gracefully.
Return as much content as possible.

* Update test_decoders.py

* Update _decoders.py

* Update _decoders.py

* Update _decoders.py

* Update httpx/_decoders.py

Co-authored-by: cdeler <serj.krotov@gmail.com>

* Update _decoders.py

---------

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: cdeler <serj.krotov@gmail.com>
2023-03-16 14:29:15 +00:00
Tom Christie
e486fbceea
Update _client.py 2023-03-15 10:11:01 +00:00
Tom Christie
0fc9009b90
Update _client.py 2023-03-15 10:07:09 +00:00
bpoirriez
c5e9c82c90
Add sslcontext to the asynclient docstring (#2609)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-03-13 12:06:21 +00:00
dependabot[bot]
ead8010a57
Bump mkdocs-material from 8.5.11 to 9.0.15 (#2610)
* Bump mkdocs-material from 8.5.11 to 9.0.15

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.5.11 to 9.0.15.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Upgrade guide](https://github.com/squidfunk/mkdocs-material/blob/master/docs/upgrade.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.5.11...9.0.15)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump `mkdocs` to minimum version required by `mkdocs-material-9.0.15`

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Adkins <michael@prefect.io>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-03-06 11:32:02 +00:00
dependabot[bot]
978e5bbe9f
Bump types-chardet from 5.0.3 to 5.0.4.2 (#2613)
Bumps [types-chardet](https://github.com/python/typeshed) from 5.0.3 to 5.0.4.2.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-chardet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-06 11:29:01 +00:00
dependabot[bot]
6779fae5ee
Bump mypy from 0.982 to 1.0.1 (#2611)
* Bump mypy from 0.982 to 1.0.1

Bumps [mypy](https://github.com/python/mypy) from 0.982 to 1.0.1.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.982...v1.0.1)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* Remove unused ignores for mypy-1.0.1

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Michael Adkins <michael@prefect.io>
2023-03-01 11:53:54 -06:00
dependabot[bot]
99a080ea78
Bump pytest from 7.2.0 to 7.2.1 (#2612)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-01 18:26:09 +01:00
dependabot[bot]
988809a9d6
Bump coverage from 6.5.0 to 7.2.1 (#2614)
Bumps [coverage](https://github.com/nedbat/coveragepy) from 6.5.0 to 7.2.1.
- [Release notes](https://github.com/nedbat/coveragepy/releases)
- [Changelog](https://github.com/nedbat/coveragepy/blob/master/CHANGES.rst)
- [Commits](https://github.com/nedbat/coveragepy/compare/6.5.0...7.2.1)

---
updated-dependencies:
- dependency-name: coverage
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-01 18:13:03 +01:00
Florimond Manca
a934c36a85
Drop private imports from test_urlparse.py (#2572)
* Drop private imports from test_urlparse.py

* Coverage

* Drop ._uri_reference
2023-02-15 14:43:19 +00:00
Adrian Garcia Badaracco
f0fd91925b
fix type annotation for MockTransport (#2581)
* fix type annotation for MockTransport

* add type ignore

* better type checks

* better type checks

* add pragma

---------

Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-02-09 16:05:07 +00:00
Florimond Manca
18e0ae45ca
Drop private imports from test_exported_members.py (#2573)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-02-09 16:00:27 +00:00
Florimond Manca
ef06f7d076
Drop private imports in tests/conftest.py (#2569)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-02-09 15:54:53 +00:00
Florimond Manca
78d381fc7d
Drop private imports from test_main.py (#2574)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-02-09 15:50:09 +00:00
Florimond Manca
7488b15226
Drop private imports from test_exceptions.py (#2571) 2023-02-08 19:35:52 -05:00
dependabot[bot]
2f0c291435
Bump cryptography from 38.0.4 to 39.0.1 (#2579)
Bumps [cryptography](https://github.com/pyca/cryptography) from 38.0.4 to 39.0.1.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pyca/cryptography/compare/38.0.4...39.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-08 13:20:04 +01:00
Paul Schreiber
5747764104
Remove rfc3986 from Chinese readme (#2576)
fix https://github.com/encode/httpx/pull/2252
2023-02-06 18:42:35 +01:00
dependabot[bot]
562b4b40aa
Bump trio from 0.21.0 to 0.22.0 (#2562)
* Bump trio from 0.21.0 to 0.22.0

Bumps [trio](https://github.com/python-trio/trio) from 0.21.0 to 0.22.0.
- [Release notes](https://github.com/python-trio/trio/releases)
- [Commits](https://github.com/python-trio/trio/compare/v0.21.0...v0.22.0)

---
updated-dependencies:
- dependency-name: trio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Ignore MultiError deprecation warning, it will disappear with anyio 4

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: florimondmanca <florimond.manca@protonmail.com>
2023-02-04 23:18:36 +01:00
dependabot[bot]
bd00151b25
Bump isort from 5.11.4 to 5.12.0 (#2563)
* Bump isort from 5.11.4 to 5.12.0

Bumps [isort](https://github.com/pycqa/isort) from 5.11.4 to 5.12.0.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.11.4...5.12.0)

---
updated-dependencies:
- dependency-name: isort
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update requirements.txt

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
2023-02-04 23:06:00 +01:00
dependabot[bot]
2880c0861e
Bump twine from 4.0.1 to 4.0.2 (#2565)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-01 18:27:53 +01:00
dependabot[bot]
64f4523253
Bump build from 0.8.0 to 0.10.0 (#2564)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-01 17:27:46 +01:00
dependabot[bot]
e071ca13a6
Bump flake8-bugbear from 22.7.1 to 23.1.20 (#2561)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-02-01 17:18:21 +01: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
7947b56076
Drop private import of 'encode_request' in test_multipart (#2525) 2023-01-10 11:23:14 +00:00
Tom Christie
a6af45edac
Use '%20' for encoding spaces in query parameters. (#2543)
* Add failing test

* Fix failing test case

* Add urlencode

* Update comment
2023-01-10 11:16:09 +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
Michał Górny
7c53d99da8
Bump rich pin to allow version 13 (#2546)
See https://github.com/encode/httpx/discussions/2544
2023-01-05 12:38:37 +00:00
Tom Christie
08a557e3e2
Version 0.23.3 (#2540) 2023-01-04 09:39:43 +00:00
Michael Adkins
bddd774ce0
Revert "Raise TypeError on invalid query params. (#2523)" (#2539)
This reverts commit 4cbf13ece2.
2023-01-04 09:23:32 +00:00
Thomas Grainger
e27d1b8333
replace pytest-asyncio and pytest-trio with anyio (#2512)
* replace pytest-asyncio with anyio

* remove pytest-trio also

* Update setup.cfg

* use anyio.Lock in test_auth

Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-01-02 12:53:30 +00:00
Hynek Schlawack
e4438a3a71
PyPI readme: fix screenshot links & trim changelog (#2522)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-01-02 12:41:45 +00:00
dependabot[bot]
6a98e188c4
Bump chardet from 5.0.0 to 5.1.0 (#2530)
Bumps [chardet](https://github.com/chardet/chardet) from 5.0.0 to 5.1.0.
- [Release notes](https://github.com/chardet/chardet/releases)
- [Commits](https://github.com/chardet/chardet/compare/5.0.0...5.1.0)

---
updated-dependencies:
- dependency-name: chardet
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-01-02 12:36:58 +00:00
dependabot[bot]
c6084c0f63
Bump mkdocs-material from 8.5.5 to 8.5.11 (#2529)
Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.5.5 to 8.5.11.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/CHANGELOG)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/8.5.5...8.5.11)

---
updated-dependencies:
- dependency-name: mkdocs-material
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-01-02 12:33:30 +00:00
dependabot[bot]
8c9110740d
Bump isort from 5.10.1 to 5.11.4 (#2528)
Bumps [isort](https://github.com/pycqa/isort) from 5.10.1 to 5.11.4.
- [Release notes](https://github.com/pycqa/isort/releases)
- [Changelog](https://github.com/PyCQA/isort/blob/main/CHANGELOG.md)
- [Commits](https://github.com/pycqa/isort/compare/5.10.1...5.11.4)

---
updated-dependencies:
- dependency-name: isort
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2023-01-02 12:29:40 +00:00
Tom Christie
2ab735849a
Version 0.23.2 (#2510)
* Version 0.23.2

* Update CHANGELOG.md
2023-01-02 11:46:22 +00:00
Tom Christie
4cbf13ece2
Raise TypeError on invalid query params. (#2523)
* Raise TypeError on invalid query params

* Fix TypeError

* Update tests/models/test_queryparams.py

Co-authored-by: Michael Adkins <contact@zanie.dev>

* Linting

* Fix exception check

Co-authored-by: Michael Adkins <contact@zanie.dev>
2022-12-30 20:56:48 +00:00
Marcelo Trylesinski
10a3b68a71
Delete setup.py (#2516) 2022-12-29 12:47:24 +01:00
Tom Christie
e5bc1ea533
Update pytest-asyncio (#2511) 2022-12-20 13:46:16 +00:00
Tom Christie
b82fbe2c13
Drop private import of 'format_form_param' from tests (#2500)
* Drop private import of 'format_form_param' from tests

* Drop unused code path
2022-12-12 16:31:29 +00:00
Tom Christie
b97c0594a5
Streaming multipart support (#2382)
* Streaming multipart support

* Update tests for streaming multipary
2022-12-12 16:14:56 +00:00
Tom Christie
af56476a8c
Drop unneccessary private import in tests (#2498) 2022-12-12 10:43:46 +00:00
Tom Christie
a8dd079be7
Raise TypeError if content is passed a 'dict' instance. (#2495) 2022-12-11 19:12:08 +00:00
Tom Christie
563a1031f5
Remove some private imports from test_decoders (#2496) 2022-12-06 18:22:04 +00:00
Tom Christie
71a1589928
Use httpx public API for 'test_content' tests (#2494) 2022-12-06 13:27:05 +00:00
Tom Christie
7985f685ca
Use consistent import style (#2493) 2022-12-06 11:58:30 +00:00
Demetri
40a0da093b
Add back in URL.raw with NamedTuple (#2481)
* add back in URL.raw with NamedTuple

* Update _urls.py

* Update _urls.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-12-02 16:20:05 +00:00
Martijn Pieters
933551c519
Typing: enable disallow_untyped_calls (#2479)
* Typing: enable disallow_untyped_calls

Only the test suite needed adjusting to add type hints.

* Update setup.cfg

Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-12-02 10:47:42 +00:00
Martijn Pieters
884a69a902
Typing: enable strict_equality (#2480)
- ignore mypy when it comes to comparing an IntEnum member with an int
- Correct type hint for `test_wsgi_server_port`'s `expected_server_port`
  parameter.

Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-12-02 08:45:28 +00:00