Commit Graph

1523 Commits

Author SHA1 Message Date
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
dependabot[bot]
d83565932c
Bump black from 22.6.0 to 22.8.0 (#2358)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-01 18:10:01 +02:00
dependabot[bot]
3a8f886afa
Bump uvicorn from 0.18.2 to 0.18.3 (#2357)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-09-01 18:06:47 +02:00
Tom Christie
965b8adec3
Allow tuple or list for multipart values (#2355) 2022-08-30 14:03:31 +01:00
Will Frey
ccd98b1a6d
Relax HeaderTypes type alias definition (#2317)
* Relax `HeaderTypes` type alias definition

This replaces `Dict[..., ...]` with `Mapping[..., ...]` in the union definition for `HeaderTypes`. Closes #2314.

* Update _models.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
2022-08-30 12:46:19 +01:00
Marcelo Trylesinski
a754e71f6f
Replace black Python target version from 3.6 to 3.7 (#2343) 2022-08-25 19:19:28 +02:00
Florimond Manca
f13ab4d288
Replace cgi which will be deprecated in Python 3.11 (#2309)
* Replace cgi which will be deprecated in Python 3.11

* Update httpx/_utils.py
2022-08-25 12:23:04 +02:00
Ofek Lev
45b7cfaad3
Update package metadata (#2334)
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
2022-08-22 18:55:06 +02:00
Marcelo Trylesinski
2b2269d5d8
Add script to make sure CHANGELOG is always in sync with __version__ (#2297)
* Add script to make sure CHANGELOG is always in sync with `__version__`

* Fix version

* Change file permission

* Change head by sed
2022-08-20 14:09:30 +02: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
Adrian Garcia Badaracco
1526048c94
allow setting an explicit multipart boundary via headers (#2278) 2022-08-15 10:20:07 -05:00
dependabot[bot]
2434e650ee
Bump types-chardet from 4.0.4 to 5.0.3 (#2324)
Bumps [types-chardet](https://github.com/python/typeshed) from 4.0.4 to 5.0.3.
- [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-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-08-02 08:15:21 +02:00