Commit Graph

1234 Commits

Author SHA1 Message Date
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
dependabot[bot]
5098f47444
Bump cryptography from 38.0.3 to 38.0.4 (#2485) 2022-12-01 17:13:10 +00:00
dependabot[bot]
d809a24892
Bump uvicorn from 0.19.0 to 0.20.0 (#2484)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 18:04:23 +01:00
dependabot[bot]
192e8d828f
Bump pytest from 7.1.2 to 7.2.0 (#2483)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-12-01 17:45:12 +01:00
Martijn Pieters
57aa5b08a4
Enable no_implicit_reexport (#2475)
- Add explicit exports for names imported from `_compat`
- Correct imports of `URL` (from `._urls`, not via `._models`)
- Correct import of the uvicorn `Server` class

Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-11-30 13:11:22 +00:00
Martijn Pieters
2d37321842
Typing: enable warn_return_any (#2477) 2022-11-30 13:08:02 +00:00
Michael Oliver
0eb97fc988
Use wsgi types from typeshed (#2478) 2022-11-30 09:48:51 +00:00
Martijn Pieters
049afe5b25
Typing: enable disallow_incomplete_defs (#2476)
The only places mypy reports issues is in the test suite.
2022-11-30 09:04:54 +00:00
Adrian Garcia Badaracco
1ff67ea47c
Typing: use wsgiref.types to validate types and fix issues uncovered (#2467)
* Typing: use wsgiref.types to validate types and fix issues uncovered

- start_response() must return a write(bytes) function, even though this
  is now deprecated. It's fine to be a no-op here.
- sys.exc_info() can return (None, None, None), so make sure to handle that case.

* remove typing_extensions

Co-authored-by: Martijn Pieters <mj@zopatista.com>
2022-11-29 17:55:21 +00:00
rettier
8327e13454
reuse the digest auth state to avoid unnecessary requests (#2463)
* reuse the digest auth challenge to avoid sending twice as many requests

* fix for digest testcase

* ran testing/linting scripts

* codereview changes, removed tomchristie username from all authentication tests

Co-authored-by: Philipp Reitter <p.reitter@accessio.at>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-11-29 17:05:37 +00:00
Adrian Garcia Badaracco
69e13cbc39
Remove and dissallow unused type ignores (#2470)
* Remove and dissallow unused type ignores

* add pragmas

* fix ignore
2022-11-29 16:55:45 +00:00
Adrian Garcia Badaracco
1fc6a52546
Add mypy flags (#2472) 2022-11-29 16:46:00 +00:00
Adrian Garcia Badaracco
1b4e7fbb48
Typing: always fill in generic type parameters (#2468)
* Typing: always fill in generic type parameters

Being explicit about the parameters helps find bugs and makes the library
easier to use for users.

- Tell mypy to disallow generics without parameter values
- Give all generic types parameters values

* fix things that aren't coming in from other commits

* lint

Co-authored-by: Martijn Pieters <mj@zopatista.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-11-29 16:36:03 +00:00
Adrian Garcia Badaracco
16e2830624
use # pragma: no cover instead of # pragma: nocover (#2471)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-11-29 10:23:18 -06: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
Adrian Garcia Badaracco
75a13a15aa
Remove typeshed iscoroutine workaround (#2466)
This was resolved in typeshed and newer mypy versions have inherited the fix.

Co-authored-by: Martijn Pieters <mj@zopatista.com>
2022-11-29 02:45:10 -06:00
Tom Christie
1ba3e2ad4c
Switch extensions from Dict to Mapping. (#2465)
* Ignore Mapping -> Dict type error

* Fix type of ResponseExtension

* Switch extensions from Dict to Mapping
2022-11-28 12:29:02 +00:00
Ben Falk
8e5e3b871b
update requests compatibility docs on query and form params (#2461) 2022-11-25 12:05:46 +00:00
Tom Christie
c0e9dba320
Update CHANGELOG.md (#2458) 2022-11-21 13:38:53 +00:00
Tom Christie
883cf8ca6f
Drop multipart requirement from tests (#2456) 2022-11-21 10:29:31 +00:00
dependabot[bot]
cd1d51d597
Bump cryptography from 38.0.1 to 38.0.3 (#2447)
Bumps [cryptography](https://github.com/pyca/cryptography) from 38.0.1 to 38.0.3.
- [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.1...38.0.3)

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

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>
2022-11-18 12:55:22 +00:00
Tom Christie
f11eff45b7
Version 0.23.1 (#2442)
* Version 0.23.1

* Update dependencies

* Update CHANGELOG

* Update CHANGELOG.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>

* Update CHANGELOG.md

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2022-11-18 12:48:32 +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
Tom Christie
8752e2672c
Drop .read/.aread from SyncByteStream/AsyncByteStream (#2407) 2022-11-07 14:01:29 +00:00
Michael K
9f9deea944
Run tests against Python 3.11 stable (#2420)
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-11-07 13:57:48 +00:00
Vincent Fazio
1aea9539bb
Drop cgi module from test_multipart (#2424)
* Use multipart instead of cgi for multipart tests

The cgi module has been deprecated as of python 3.11.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>

* Update setup.cfg

All references to the cgi module have all been removed so there's no
longer a need to silence those deprecation warnings.

The deprecation warning for certifi is resolved as of version 2022.09.24.

Signed-off-by: Vincent Fazio <vfazio@gmail.com>

Signed-off-by: Vincent Fazio <vfazio@gmail.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-11-03 11:29:23 +00:00
dependabot[bot]
db00b9279f
Bump uvicorn from 0.18.3 to 0.19.0 (#2429)
Bumps [uvicorn](https://github.com/encode/uvicorn) from 0.18.3 to 0.19.0.
- [Release notes](https://github.com/encode/uvicorn/releases)
- [Changelog](https://github.com/encode/uvicorn/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/uvicorn/compare/0.18.3...0.19.0)

---
updated-dependencies:
- dependency-name: uvicorn
  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>
2022-11-02 11:19:02 +00:00
dependabot[bot]
9175097128
Bump black from 22.8.0 to 22.10.0 (#2428)
Bumps [black](https://github.com/psf/black) from 22.8.0 to 22.10.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/compare/22.8.0...22.10.0)

---
updated-dependencies:
- dependency-name: black
  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>
2022-11-02 11:13:18 +00:00
dependabot[bot]
3b1578f931
Bump mypy from 0.971 to 0.982 (#2427)
Bumps [mypy](https://github.com/python/mypy) from 0.971 to 0.982.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.971...v0.982)

---
updated-dependencies:
- dependency-name: mypy
  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>
2022-11-02 09:48:03 +00:00
dependabot[bot]
1b2e3b7cf3
Bump autoflake from 1.4 to 1.7.7 (#2430)
Bumps [autoflake](https://github.com/PyCQA/autoflake) from 1.4 to 1.7.7.
- [Release notes](https://github.com/PyCQA/autoflake/releases)
- [Commits](https://github.com/PyCQA/autoflake/compare/v1.4...v1.7.7)

---
updated-dependencies:
- dependency-name: autoflake
  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>
2022-11-02 09:42:50 +00:00
dependabot[bot]
3f0675c73f
Bump coverage from 6.4.4 to 6.5.0 (#2431)
Bumps [coverage](https://github.com/nedbat/coveragepy) from 6.4.4 to 6.5.0.
- [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.4.4...6.5.0)

---
updated-dependencies:
- dependency-name: coverage
  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>
2022-11-01 18:09:45 +01:00
Tom Christie
9e97d7d429
Drop stalebot (#2412)
Sorry @stalebot, but we don't need your work here.

We've a low enough ticket count, and you're just adding noise.
2022-10-18 14:42:28 +01:00
Ramazan Elsunakev
71ee50b277
Add parameters to generics in _client.py (#2266)
Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Adrian Garcia Badaracco <1755071+adriangb@users.noreply.github.com>
2022-10-12 09:45:06 +01:00
Meder Kamalov
36f16234bc
Add dark mode toggle for documentation (#2403) 2022-10-11 11:54:24 +01:00
Tom Christie
0ebe9259ac
Allow str content for multipart upload files (#2400) 2022-10-06 17:53:51 +01:00
Tom Christie
770d4f2254
Remove unneeded installation on install script (#2398) 2022-10-06 15:43:43 +02:00
Tom Christie
2ac58e007a
Always use latest version of pip. (#2396)
Installation should start by updating `pip` to the latest version.

Resolves issue noted in https://github.com/encode/httpx/pull/2334#issuecomment-1268308195
2022-10-05 18:42:32 +01:00
dependabot[bot]
9f70f54316
Bump cryptography from 37.0.2 to 38.0.1 (#2389)
Bumps [cryptography](https://github.com/pyca/cryptography) from 37.0.2 to 38.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/37.0.2...38.0.1)

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

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>
2022-10-04 14:12:43 +01:00
Tom Christie
bb65d9e28e
Pin importlib-metadata (#2393) 2022-10-04 15:04:02 +02:00
dependabot[bot]
801ab9d573
Bump flake8-pie from 0.15.0 to 0.16.0 (#2387)
Bumps [flake8-pie](https://github.com/sbdchd/flake8-pie) from 0.15.0 to 0.16.0.
- [Release notes](https://github.com/sbdchd/flake8-pie/releases)
- [Commits](https://github.com/sbdchd/flake8-pie/commits)

---
updated-dependencies:
- dependency-name: flake8-pie
  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>
2022-10-04 13:54:21 +01:00
dependabot[bot]
b1618227cc
Bump mkdocs-material from 8.3.8 to 8.5.5 (#2388)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-01 18:12:37 +02:00
dependabot[bot]
a7711377da
Bump mkdocs from 1.3.1 to 1.4.0 (#2390)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-10-01 18:06:30 +02:00
Jo
8088fc7ff7
Test under 3.11-dev (#2302)
* Test under 3.11.0-beta.3

* Ignore cgi and importlib warnings

* Ignore src_constant warning

* Install whell before other requirements

* Minor

* Remove uvicorn ignore

* Use 3.11-dev instead

* Add 3.11 to classifiers

* Revert unrelated change

* Bump coverage
2022-09-29 17:00:21 +01:00
Marcelo Trylesinski
cdde07f2aa
Add thread-safety note on the Client docstring (#2380) 2022-09-29 12:09:11 +02:00
Adrian Garcia Badaracco
8152c4facd
add basic type annotation for RequestExtensions and RequestData (#2367) 2022-09-13 09:24:01 -05:00
chaojie
27db35296b
Make chinese README better (#2366) 2022-09-06 00:18:44 +08:00
Tom Christie
d5900cd40e
Fix empty query params (#2354)
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
2022-09-02 14:24:45 +01:00
dependabot[bot]
3eee17e69e
Bump mkautodoc from 0.1.0 to 0.2.0 (#2361)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-01 19:15:45 +02:00
dependabot[bot]
e34a977a58
Bump trio from 0.20.0 to 0.21.0 (#2360)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-01 18:22:44 +02:00
Marcelo Trylesinski
9f79b5c090
Add fake setup.py (#2351) 2022-09-01 18:13:35 +02:00