]> git.ipfire.org Git - thirdparty/httpx.git/log
thirdparty/httpx.git
3 years agoBump `black` to 22.3.0 (#2153)
Marcelo Trylesinski [Wed, 30 Mar 2022 08:56:57 +0000 (10:56 +0200)] 
Bump `black` to 22.3.0 (#2153)

* Bump black to 22.3.0

* Apply black

3 years agoUpdate stale.yml (#2150)
Tom Christie [Mon, 28 Mar 2022 12:26:41 +0000 (13:26 +0100)] 
Update stale.yml (#2150)

3 years agoAllow rich 12 (#2122)
Raffaele Salmaso [Mon, 28 Mar 2022 11:59:07 +0000 (13:59 +0200)] 
Allow rich 12 (#2122)

3 years agoUpgrade mkdocs to 1.3.0 to fix scripts/docs failure (#2147)
Florimond Manca [Mon, 28 Mar 2022 03:46:47 +0000 (05:46 +0200)] 
Upgrade mkdocs to 1.3.0 to fix scripts/docs failure (#2147)

3 years agoFix cli docs --proxies #2124 (#2125)
kk [Mon, 14 Mar 2022 16:51:39 +0000 (00:51 +0800)] 
Fix cli docs --proxies #2124 (#2125)

3 years agoAdd robox to third party packages doc (#2113)
Dan Claudiu Pop [Tue, 8 Mar 2022 10:53:15 +0000 (12:53 +0200)] 
Add robox to third party packages doc (#2113)

* Add robox to third party packages doc

* Update third_party_packages.md

3 years agoBump flake8-bugbear from 21.9.2 to 22.1.11 (#2100)
dependabot[bot] [Fri, 4 Mar 2022 19:07:52 +0000 (19:07 +0000)] 
Bump flake8-bugbear from 21.9.2 to 22.1.11 (#2100)

Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 21.9.2 to 22.1.11.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](https://github.com/PyCQA/flake8-bugbear/compare/21.9.2...22.1.11)

---
updated-dependencies:
- dependency-name: flake8-bugbear
  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>
Co-authored-by: Tom Christie <tom@tomchristie.com>
3 years agoBump pytest from 6.2.5 to 7.0.1 (#2103)
dependabot[bot] [Thu, 3 Mar 2022 10:09:05 +0000 (10:09 +0000)] 
Bump pytest from 6.2.5 to 7.0.1 (#2103)

Bumps [pytest](https://github.com/pytest-dev/pytest) from 6.2.5 to 7.0.1.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/6.2.5...7.0.1)

---
updated-dependencies:
- dependency-name: pytest
  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>
3 years agoFix invalid max_keepalive_connections argument name (#2094)
Ben Fasoli [Fri, 25 Feb 2022 14:10:35 +0000 (06:10 -0800)] 
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.

3 years agoadding keepalive_expiry param to docs and docstring (#2090)
Udasi Tharani [Tue, 22 Feb 2022 10:40:14 +0000 (16:10 +0530)] 
adding keepalive_expiry param to docs and docstring (#2090)

4 years agoCreate stale.yml (#2085)
Tom Christie [Thu, 17 Feb 2022 09:32:47 +0000 (09:32 +0000)] 
Create stale.yml (#2085)

4 years agoMove URL and QueryParams to new '_urls.py' module (#2084)
Tom Christie [Wed, 16 Feb 2022 21:02:13 +0000 (21:02 +0000)] 
Move URL and QueryParams to new '_urls.py' module (#2084)

4 years agoDocs tweaks (#2075)
Tom Christie [Wed, 9 Feb 2022 16:05:20 +0000 (16:05 +0000)] 
Docs tweaks (#2075)

4 years agoSuppress binary output on the command line (#2049) (#2076)
waterfountain1996 [Wed, 9 Feb 2022 15:40:39 +0000 (17:40 +0200)] 
Suppress binary output on the command line (#2049) (#2076)

4 years agoRefactor `httpx/_utils.py` (#1943)
Yasser Tahiri [Wed, 9 Feb 2022 12:12:09 +0000 (13:12 +0100)] 
Refactor `httpx/_utils.py` (#1943)

* Removes unnecessary call to keys() when iterating over a dictionary

* Simplify conditionals into a form like a switch statement

* Merge else clause's nested if statement into elif

* Update httpx/_utils.py

* Update httpx/_utils.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoupdate eerror docs to use StreamClosed instead of old ResponseClosed (#1913)
iscai-msft [Wed, 9 Feb 2022 11:53:49 +0000 (06:53 -0500)] 
update eerror docs to use StreamClosed instead of old ResponseClosed (#1913)

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoPreserve Authorization header on HTTPS redirect (#1850) (#2074)
waterfountain1996 [Wed, 9 Feb 2022 11:18:21 +0000 (13:18 +0200)] 
Preserve Authorization header on HTTPS redirect (#1850) (#2074)

* Preserve Authorization header on HTTPS redirect (#1850)

* Update httpx/_client.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoupdate docstring/docs for transport using request/response models (#2070)
toppk [Tue, 8 Feb 2022 14:58:08 +0000 (09:58 -0500)] 
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>
4 years agoEnsure that iter_bytes does not ever yield any zero-length chunks (#2068)
Tom Christie [Mon, 7 Feb 2022 09:19:26 +0000 (09:19 +0000)] 
Ensure that iter_bytes does not ever yield any zero-length chunks (#2068)

4 years agoAlways rewind files on multipart uploads. (#2065)
Tom Christie [Fri, 4 Feb 2022 14:48:57 +0000 (14:48 +0000)] 
Always rewind files on multipart uploads. (#2065)

* Test for multipart POST same file twice.

* Always rewind files on multipart uploads

* Linting

4 years agoFix console markup escaping issue (#1866)
Will McGugan [Fri, 4 Feb 2022 12:33:32 +0000 (12:33 +0000)] 
Fix console markup escaping issue (#1866)

* fix for markup escaping in progress

* whitespace

* restore new line

* Update _main.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
4 years agoAllow rich-11 (#2057)
Michał Górny [Tue, 1 Feb 2022 12:28:12 +0000 (13:28 +0100)] 
Allow rich-11 (#2057)

Relax the version bind on rich to allow v11.  There are no test
regressions with the new version, and CLI seems to work correctly.

4 years agomake docs accurate that `content=` is also excluded in some requests (#1922)
Simon K [Thu, 27 Jan 2022 11:58:33 +0000 (11:58 +0000)] 
make docs accurate that `content=` is also excluded in some requests (#1922)

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoVersion 0.22.0 (#2048) 0.22.0
Tom Christie [Wed, 26 Jan 2022 14:47:40 +0000 (14:47 +0000)] 
Version 0.22.0 (#2048)

* SOCKS proxy support

* Version 0.22.0

* Link to socksio

4 years agoUpdate publish.yml (#2040)
Tom Christie [Mon, 24 Jan 2022 12:14:00 +0000 (12:14 +0000)] 
Update publish.yml (#2040)

4 years agoDo not recommend the deprecated `data=` kwarg for passing bytes. (#2044)
Vytautas Liuolia [Sun, 23 Jan 2022 20:37:27 +0000 (21:37 +0100)] 
Do not recommend the deprecated `data=` kwarg for passing bytes. (#2044)

(`data=` is meant for sending form data.)

4 years agoFix Headers.update to correctly handle repeated headers (#2038)
Adrian Garcia Badaracco [Fri, 21 Jan 2022 16:35:10 +0000 (08:35 -0800)] 
Fix Headers.update to correctly handle repeated headers (#2038)

4 years agoSOCKS proxy support (#2034)
Tom Christie [Wed, 19 Jan 2022 14:58:19 +0000 (14:58 +0000)] 
SOCKS proxy support (#2034)

4 years agoDont perform implicit close/warning on `__del__` (#2026)
Tom Christie [Thu, 13 Jan 2022 10:37:37 +0000 (10:37 +0000)] 
Dont perform implicit close/warning on `__del__` (#2026)

* Version 0.21.3

* Don't perform implict close on __del__

4 years agoAllow custom headers in multipart/form-data requests (#1936)
Adrian Garcia Badaracco [Thu, 13 Jan 2022 08:49:14 +0000 (00:49 -0800)] 
Allow custom headers in multipart/form-data requests (#1936)

* feat: allow passing multipart headers

* Add test for including content-type in headers

* lint

* override content_type with headers

* compare tuples based on length

* incorporate suggestion

* remove .title() on headers

4 years agoDrop mention of backend selection for AsyncHTTPTransport() in docs (#2019)
Denis Laxalde [Mon, 10 Jan 2022 09:39:13 +0000 (10:39 +0100)] 
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.

4 years agoFix typo in change-log. (#2018)
Tom Christie [Fri, 7 Jan 2022 10:51:17 +0000 (10:51 +0000)] 
Fix typo in change-log. (#2018)

Version was specified incorrectly.

See: https://github.com/encode/httpx/pull/2016#issuecomment-1006721639

4 years agoVersion 0.21.3 (#2017) 0.21.3
Tom Christie [Thu, 6 Jan 2022 14:36:58 +0000 (14:36 +0000)] 
Version 0.21.3 (#2017)

4 years agoFix for stream uploads that subclass SyncByteStream/AsyncByteStream (#2016)
Tom Christie [Thu, 6 Jan 2022 14:06:35 +0000 (14:06 +0000)] 
Fix for stream uploads that subclass SyncByteStream/AsyncByteStream (#2016)

4 years agoBump pytest-asyncio from 0.15.1 to 0.16.0 (#2005)
dependabot[bot] [Thu, 6 Jan 2022 14:01:10 +0000 (14:01 +0000)] 
Bump pytest-asyncio from 0.15.1 to 0.16.0 (#2005)

Bumps [pytest-asyncio](https://github.com/pytest-dev/pytest-asyncio) from 0.15.1 to 0.16.0.
- [Release notes](https://github.com/pytest-dev/pytest-asyncio/releases)
- [Commits](https://github.com/pytest-dev/pytest-asyncio/compare/v0.15.1...v0.16.0)

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

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>
4 years agoVersion 0.21.2 (#2011) 0.21.2
Tom Christie [Wed, 5 Jan 2022 16:24:42 +0000 (16:24 +0000)] 
Version 0.21.2 (#2011)

4 years agoCI should just use Python 3.9, not "3.9.5" (#2010)
Tom Christie [Wed, 5 Jan 2022 16:04:56 +0000 (16:04 +0000)] 
CI should just use Python 3.9, not "3.9.5" (#2010)

4 years agoHTTP/2 support for tunnelled proxy cases. (#2009)
Tom Christie [Wed, 5 Jan 2022 16:01:47 +0000 (16:01 +0000)] 
HTTP/2 support for tunnelled proxy cases. (#2009)

* Cap upload chunk sizes

* Use '.read' for file streaming, where possible

* Direct iteration should not apply chunk sizes

* HTTP/2 support for proxies

4 years agoBump mkdocs-material from 8.0.2 to 8.1.4 (#2006)
dependabot[bot] [Wed, 5 Jan 2022 14:27:25 +0000 (14:27 +0000)] 
Bump mkdocs-material from 8.0.2 to 8.1.4 (#2006)

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 8.0.2 to 8.1.4.
- [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.0.2...8.1.4)

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

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>
4 years agoBump isort from 5.9.3 to 5.10.1 (#1999)
dependabot[bot] [Mon, 3 Jan 2022 16:00:45 +0000 (16:00 +0000)] 
Bump isort from 5.9.3 to 5.10.1 (#1999)

Bumps [isort](https://github.com/pycqa/isort) from 5.9.3 to 5.10.1.
- [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.9.3...5.10.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoBump twine from 3.4.2 to 3.7.1 (#1998)
dependabot[bot] [Mon, 3 Jan 2022 15:54:21 +0000 (15:54 +0000)] 
Bump twine from 3.4.2 to 3.7.1 (#1998)

Bumps [twine](https://github.com/pypa/twine) from 3.4.2 to 3.7.1.
- [Release notes](https://github.com/pypa/twine/releases)
- [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/twine/compare/3.4.2...3.7.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoBump cryptography from 3.4.8 to 36.0.1 (#2000)
dependabot[bot] [Mon, 3 Jan 2022 13:25:59 +0000 (13:25 +0000)] 
Bump cryptography from 3.4.8 to 36.0.1 (#2000)

Bumps [cryptography](https://github.com/pyca/cryptography) from 3.4.8 to 36.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/3.4.8...36.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoTiny refactor on _multipart.py & _main.py (#1971)
Mohammadreza Jafari [Tue, 21 Dec 2021 17:15:34 +0000 (20:45 +0330)] 
Tiny refactor on _multipart.py & _main.py (#1971)

* remove unnecessary casting in f-string

* merge nested condition

4 years agoFix typos (#1968)
Kian Meng, Ang [Tue, 14 Dec 2021 14:04:01 +0000 (22:04 +0800)] 
Fix typos (#1968)

4 years agoBump mkdocs-material from 7.2.6 to 8.0.2 (#1958)
dependabot[bot] [Mon, 6 Dec 2021 14:38:50 +0000 (14:38 +0000)] 
Bump mkdocs-material from 7.2.6 to 8.0.2 (#1958)

* Bump mkdocs-material from 7.2.6 to 8.0.2

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.2.6 to 8.0.2.
- [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/7.2.6...8.0.2)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoBump pytest from 6.2.4 to 6.2.5 (#1956)
dependabot[bot] [Wed, 1 Dec 2021 20:37:39 +0000 (20:37 +0000)] 
Bump pytest from 6.2.4 to 6.2.5 (#1956)

4 years agoBump trustme from 0.8.0 to 0.9.0 (#1955)
dependabot[bot] [Wed, 1 Dec 2021 19:40:17 +0000 (19:40 +0000)] 
Bump trustme from 0.8.0 to 0.9.0 (#1955)

4 years agoBump black from 21.10b0 to 21.11b1 (#1954)
dependabot[bot] [Wed, 1 Dec 2021 18:19:45 +0000 (18:19 +0000)] 
Bump black from 21.10b0 to 21.11b1 (#1954)

4 years agoFix typo on _merge_url (#1949)
wo0d [Tue, 23 Nov 2021 09:04:31 +0000 (17:04 +0800)] 
Fix typo on _merge_url (#1949)

seperator -> separator

4 years agoRead upload files using `read(CHUNK_SIZE)` rather than `iter()`. (#1948)
Tom Christie [Mon, 22 Nov 2021 13:15:39 +0000 (13:15 +0000)] 
Read upload files using `read(CHUNK_SIZE)` rather than `iter()`. (#1948)

* Cap upload chunk sizes

* Use '.read' for file streaming, where possible

* Direct iteration should not apply chunk sizes

4 years agoreadmes/README.scn.md (#1946)
Kevin Anderson [Mon, 22 Nov 2021 12:22:45 +0000 (20:22 +0800)] 
readmes/README.scn.md (#1946)

* Create README_chinese.md

* Update README_chinese.md

* Update README_chinese.md

* Update README_chinese.md

* Update README_chinese.md

4 years agoVersion 0.21.1 (#1941) 0.21.1
Tom Christie [Tue, 16 Nov 2021 11:51:56 +0000 (11:51 +0000)] 
Version 0.21.1 (#1941)

4 years agoFix response.url annotation (#1940)
Tom Christie [Tue, 16 Nov 2021 11:47:46 +0000 (11:47 +0000)] 
Fix response.url annotation (#1940)

4 years agoVersion 0.21 release notes (#1938)
Tom Christie [Mon, 15 Nov 2021 14:35:09 +0000 (14:35 +0000)] 
Version 0.21 release notes (#1938)

4 years agoVersion 0.21 (#1935) 0.21.0
Tom Christie [Mon, 15 Nov 2021 14:30:54 +0000 (14:30 +0000)] 
Version 0.21 (#1935)

* Integrate with httpcore 0.14

* Fix pool timeout test

* Add request extensions to API

* Add certificate and connection info to client, using 'trace' extension

* Fix test_pool_timeout flakiness

4 years agoBump flake8-bugbear from 21.4.3 to 21.9.2 (#1917)
dependabot[bot] [Mon, 15 Nov 2021 11:00:30 +0000 (11:00 +0000)] 
Bump flake8-bugbear from 21.4.3 to 21.9.2 (#1917)

Bumps [flake8-bugbear](https://github.com/PyCQA/flake8-bugbear) from 21.4.3 to 21.9.2.
- [Release notes](https://github.com/PyCQA/flake8-bugbear/releases)
- [Commits](https://github.com/PyCQA/flake8-bugbear/compare/21.4.3...21.9.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoBump black from 21.9b0 to 21.10b0 (#1921)
dependabot[bot] [Mon, 15 Nov 2021 10:24:12 +0000 (10:24 +0000)] 
Bump black from 21.9b0 to 21.10b0 (#1921)

Bumps [black](https://github.com/psf/black) from 21.9b0 to 21.10b0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoBump types-certifi from 0.1.4 to 2021.10.8.0 (#1918)
dependabot[bot] [Fri, 12 Nov 2021 13:50:39 +0000 (13:50 +0000)] 
Bump types-certifi from 0.1.4 to 2021.10.8.0 (#1918)

Bumps [types-certifi](https://github.com/python/typeshed) from 0.1.4 to 2021.10.8.0.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-certifi
  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>
4 years agoExpand docs note for async custom handler responses (#1916)
Tyler Chamberlain [Mon, 1 Nov 2021 11:39:18 +0000 (06:39 -0500)] 
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

4 years agodoc: Update comments about file types in _types.py (#1898)
Adrian Garcia Badaracco [Mon, 18 Oct 2021 10:19:42 +0000 (05:19 -0500)] 
doc: Update comments about file types in _types.py (#1898)

* doc: Update comments about file types in _types.py

https://github.com/encode/httpx/discussions/1897

* Update httpx/_types.py

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoBump flake8-pie from 0.5.0 to 0.15.0 (#1879)
dependabot[bot] [Fri, 15 Oct 2021 10:03:53 +0000 (12:03 +0200)] 
Bump flake8-pie from 0.5.0 to 0.15.0 (#1879)

* Bump flake8-pie from 0.5.0 to 0.15.0

Bumps [flake8-pie](https://github.com/sbdchd/flake8-pie) from 0.5.0 to 0.15.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>
* Don't use PIE on 3.6

* Adhere or ignore new rules

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
4 years agoBump black from 20.8b1 to 21.9b0 (#1877)
dependabot[bot] [Fri, 15 Oct 2021 09:44:37 +0000 (11:44 +0200)] 
Bump black from 20.8b1 to 21.9b0 (#1877)

Bumps [black](https://github.com/psf/black) from 20.8b1 to 21.9b0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](https://github.com/psf/black/commits)

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

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>
Co-authored-by: Florimond Manca <florimond.manca@protonmail.com>
4 years agoDon't pickle request/response extensions (#1892)
Tom Christie [Wed, 13 Oct 2021 12:45:29 +0000 (13:45 +0100)] 
Don't pickle request/response extensions (#1892)

4 years agoBump wheel from 0.36.2 to 0.37.0 (#1878)
dependabot[bot] [Wed, 13 Oct 2021 11:02:04 +0000 (12:02 +0100)] 
Bump wheel from 0.36.2 to 0.37.0 (#1878)

Bumps [wheel](https://github.com/pypa/wheel) from 0.36.2 to 0.37.0.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.36.2...0.37.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
4 years agoBump coverage from 5.3 to 6.0.2 (#1891)
dependabot[bot] [Wed, 13 Oct 2021 10:43:07 +0000 (11:43 +0100)] 
Bump coverage from 5.3 to 6.0.2 (#1891)

Bumps [coverage](https://github.com/nedbat/coveragepy) from 5.3 to 6.0.2.
- [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/coverage-5.3...6.0.2)

---
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>
4 years agoBump isort from 5.9.1 to 5.9.3 (#1881)
dependabot[bot] [Wed, 13 Oct 2021 10:37:01 +0000 (11:37 +0100)] 
Bump isort from 5.9.1 to 5.9.3 (#1881)

Bumps [isort](https://github.com/pycqa/isort) from 5.9.1 to 5.9.3.
- [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.9.1...5.9.3)

---
updated-dependencies:
- dependency-name: isort
  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>
4 years agoVersion 0.20 (#1890) 0.20.0
Tom Christie [Wed, 13 Oct 2021 09:43:58 +0000 (10:43 +0100)] 
Version 0.20 (#1890)

* Version 0.20

* Add date to changelog

* Freeze charset-normalizer to a known version for testing consistency

4 years agoUpdate index.md (#1883)
Marcelo Trylesinski [Wed, 6 Oct 2021 12:26:49 +0000 (14:26 +0200)] 
Update index.md (#1883)

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoBump Python 3.10 in the CI (#1886)
Marcelo Trylesinski [Wed, 6 Oct 2021 09:13:34 +0000 (11:13 +0200)] 
Bump Python 3.10 in the CI (#1886)

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoRun CI on 3.9.5 (#1887)
Tom Christie [Wed, 6 Oct 2021 08:46:45 +0000 (09:46 +0100)] 
Run CI on 3.9.5 (#1887)

* Update test-suite.yml

* Update test-suite.yml

4 years agoTidy up the formatting of HTTP/2 requests (#1860)
Tom Christie [Tue, 14 Sep 2021 12:36:22 +0000 (13:36 +0100)] 
Tidy up the formatting of HTTP/2 requests (#1860)

* Tidy up the formatting of HTTP/2 requests

* Black linting

4 years agoFix typo. (#1859)
Tom Christie [Tue, 14 Sep 2021 11:48:06 +0000 (12:48 +0100)] 
Fix typo. (#1859)

4 years agoList 'click' and 'rich' in the project dependencies (#1858)
Tom Christie [Tue, 14 Sep 2021 09:44:07 +0000 (10:44 +0100)] 
List 'click' and 'rich' in the project dependencies (#1858)

4 years agoUpdate README.md (#1857)
Tom Christie [Tue, 14 Sep 2021 08:54:50 +0000 (09:54 +0100)] 
Update README.md (#1857)

4 years agoAdd cli support (#1855) 1.0.0.beta0
Tom Christie [Tue, 14 Sep 2021 08:44:43 +0000 (09:44 +0100)] 
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

4 years agois_informational / is_success / is_redirect / is_client_error / is_server_error ...
Tom Christie [Mon, 13 Sep 2021 12:52:58 +0000 (13:52 +0100)] 
is_informational / is_success / is_redirect / is_client_error / is_server_error (#1854)

4 years agoTransport API as plain `request -> response` method. (#1840)
Tom Christie [Mon, 13 Sep 2021 12:34:46 +0000 (13:34 +0100)] 
Transport API as plain `request -> response` method. (#1840)

* Responses as context managers

* timeout -> request.extensions

* Transport API -> request/response signature

* Fix top-level httpx.stream()

* Drop response context manager methods

* Simplify ASGI tests

* Black formatting

4 years agoSwitch follow redirects default (#1808)
Tom Christie [Mon, 13 Sep 2021 12:21:22 +0000 (13:21 +0100)] 
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

4 years agoBUG: wsgi.error should be TextIO, not BytesIO in WSGI transport (#1828)
Adrian Garcia Badaracco [Tue, 7 Sep 2021 14:44:35 +0000 (09:44 -0500)] 
BUG: wsgi.error should be TextIO, not BytesIO in WSGI transport (#1828)

* wsgi.error should be StringIO, not BytesIO

Based on the documentation at https://modwsgi.readthedocs.io/en/master/user-guides/debugging-techniques.html#apache-error-log-files

* Default to sys.stderr and add test

* rename log_file param to wsgi_errors

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoFix conditional imports for pyright (#1839)
Robert Craigie [Fri, 3 Sep 2021 13:51:42 +0000 (14:51 +0100)] 
Fix conditional imports for pyright (#1839)

4 years agoBump mkdocs-material from 7.1.8 to 7.2.6 (#1835)
dependabot[bot] [Fri, 3 Sep 2021 11:26:01 +0000 (12:26 +0100)] 
Bump mkdocs-material from 7.1.8 to 7.2.6 (#1835)

* Bump mkdocs-material from 7.1.8 to 7.2.6

Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 7.1.8 to 7.2.6.
- [Release notes](https://github.com/squidfunk/mkdocs-material/releases)
- [Changelog](https://github.com/squidfunk/mkdocs-material/blob/master/docs/changelog.md)
- [Commits](https://github.com/squidfunk/mkdocs-material/compare/7.1.8...7.2.6)

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

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoBump twine from 3.4.1 to 3.4.2 (#1838)
dependabot[bot] [Fri, 3 Sep 2021 09:33:38 +0000 (10:33 +0100)] 
Bump twine from 3.4.1 to 3.4.2 (#1838)

Bumps [twine](https://github.com/pypa/twine) from 3.4.1 to 3.4.2.
- [Release notes](https://github.com/pypa/twine/releases)
- [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst)
- [Commits](https://github.com/pypa/twine/compare/3.4.1...3.4.2)

---
updated-dependencies:
- dependency-name: twine
  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>
4 years agoBump cryptography from 3.4.7 to 3.4.8 (#1837)
dependabot[bot] [Fri, 3 Sep 2021 09:30:01 +0000 (10:30 +0100)] 
Bump cryptography from 3.4.7 to 3.4.8 (#1837)

Bumps [cryptography](https://github.com/pyca/cryptography) from 3.4.7 to 3.4.8.
- [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/3.4.7...3.4.8)

---
updated-dependencies:
- dependency-name: cryptography
  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>
Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoBump trio-typing from 0.5.0 to 0.5.1 (#1836)
dependabot[bot] [Fri, 3 Sep 2021 09:26:48 +0000 (10:26 +0100)] 
Bump trio-typing from 0.5.0 to 0.5.1 (#1836)

Bumps [trio-typing](https://github.com/python-trio/trio-typing) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/python-trio/trio-typing/releases)
- [Commits](https://github.com/python-trio/trio-typing/commits)

---
updated-dependencies:
- dependency-name: trio-typing
  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>
4 years agoAdd dependabot (#1823)
Marcelo Trylesinski [Fri, 3 Sep 2021 09:19:15 +0000 (11:19 +0200)] 
Add dependabot (#1823)

* Add dependabot

* Delete automerge.yml

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoClose WSGI iterable when WSGIByteStream is closed (#1830)
Stanis Trendelenburg [Wed, 1 Sep 2021 15:21:01 +0000 (17:21 +0200)] 
Close WSGI iterable when WSGIByteStream is closed (#1830)

* Make test fail when WSGI iterable is not closed

* Close WSGI iterable when WSGIByteStream is closed

4 years ago:pencil: Docs patch following PR #1791 section compatibility.encoding (#1812)
TAHRI Ahmed R [Tue, 31 Aug 2021 12:44:12 +0000 (05:44 -0700)] 
:pencil: Docs patch following PR #1791 section compatibility.encoding (#1812)

* :pencil: Docs patch following PR #1791 section compatibility.encoding

Reintroducing charset detection

* 📝 Amend sentence in 3080a9d66ead9b1ffcdc2ec9f4f9364734f8a0c4

Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years ago📌 Pin development requirements (#1721)
Marcelo Trylesinski [Tue, 31 Aug 2021 12:13:42 +0000 (14:13 +0200)] 
📌 Pin development requirements (#1721)

* :pushpin: Pin development requirements

* :heavy_minus_sign: Remove attrs dependency

* Add note about decision here

Co-authored-by: Tom Christie <tom@tomchristie.com>
Co-authored-by: Joe <jianghang@didiglobal.com>
4 years agoFix iter_bytes with empty content (#1827)
Tom Christie [Tue, 31 Aug 2021 10:52:52 +0000 (11:52 +0100)] 
Fix iter_bytes with empty content (#1827)

4 years agoTest under Python 3.10.0 RC 1 (#1820)
Hugo van Kemenade [Fri, 27 Aug 2021 13:01:06 +0000 (16:01 +0300)] 
Test under Python 3.10.0 RC 1 (#1820)

4 years agoFix typo in RemoteProtocolError description (#1817)
Patrick Arminio [Thu, 26 Aug 2021 01:26:06 +0000 (02:26 +0100)] 
Fix typo in RemoteProtocolError description (#1817)

4 years agoFix 0.19.0 release date in CHANGELOG (#1811)
Florimond Manca [Fri, 20 Aug 2021 09:40:05 +0000 (11:40 +0200)] 
Fix 0.19.0 release date in CHANGELOG (#1811)

4 years agoVersion 0.19.0 (#1809) 0.19.0
Tom Christie [Thu, 19 Aug 2021 11:37:25 +0000 (12:37 +0100)] 
Version 0.19.0 (#1809)

* Update CHANGELOG

* Update CHANGELOG

* Version 0.19.0

* Update CHANGELOG

4 years agoSwitch event hooks to also run on redirects. (#1806)
Tom Christie [Wed, 18 Aug 2021 14:12:39 +0000 (15:12 +0100)] 
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()

4 years agoResolve Python 3.6 tests hanging. (#1807)
Tom Christie [Wed, 18 Aug 2021 13:08:52 +0000 (14:08 +0100)] 
Resolve Python 3.6 tests hanging. (#1807)

* Update README.md

* Update requirements.txt

* Update README.md

4 years agoStricter enforcement of either 'with httpx.Client() as client' or 'client = httpx...
Tom Christie [Fri, 13 Aug 2021 14:17:15 +0000 (15:17 +0100)] 
Stricter enforcement of either 'with httpx.Client() as client' or 'client = httpx.Client()' lifespan styles. (#1800)

4 years agoAdd a network pytest mark for tests that use the network (#1669)
Antonio Larrosa [Fri, 13 Aug 2021 13:13:43 +0000 (15:13 +0200)] 
Add a network pytest mark for tests that use the network (#1669)

* Add a network pytest mark for tests that use the network

Sometimes it's useful to have the tests that use the network
marked so they can be skipped easily when we know the network
is not available.

This is useful for example on SUSE and openSUSE's build servers.
When building the httpx packages (actually, any package in the
distribution) the network is disabled so we can assure
reproducible builds (among other benefits). With this mark, it's
easier to skip tests that can not succeed.

* Add a better explanation for the network marker

Co-authored-by: Florimond Manca <15911462+florimondmanca@users.noreply.github.com>
Co-authored-by: Joe <nigelchiang@outlook.com>
Co-authored-by: Florimond Manca <15911462+florimondmanca@users.noreply.github.com>
Co-authored-by: Tom Christie <tom@tomchristie.com>
4 years agoUse either brotli or brotlicffi. (#1618)
Tom Christie [Fri, 13 Aug 2021 10:52:45 +0000 (11:52 +0100)] 
Use either brotli or brotlicffi. (#1618)

* Use either brotli (recommended for CPython) or brotlicffi (Recommended for PyPy and others)

* Add comments in places where we switch behaviour depending on brotli/brotlicffi

Co-authored-by: Florimond Manca <florimond.manca@gmail.com>
4 years agoAdd `charset_normalizer` detection. (#1791)
Tom Christie [Fri, 13 Aug 2021 10:38:53 +0000 (11:38 +0100)] 
Add `charset_normalizer` detection. (#1791)

* Add charset_normalizer detection

* Tweak JSON tests for slightly different charset decoding behaviour

* Add charset-normalizer to docs

4 years agoDrop mode argument, 'httpx.Proxy(..., mode=...)' (#1795)
Tom Christie [Fri, 13 Aug 2021 10:34:56 +0000 (11:34 +0100)] 
Drop mode argument, 'httpx.Proxy(..., mode=...)' (#1795)