From b871b4b8b29aca2e675645fae0c9f8e7d2a5e7d5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:11:45 +0400 Subject: [PATCH 1/7] Bump mkdocs-material from 9.4.14 to 9.5.3 (#3035) Bumps [mkdocs-material](https://github.com/squidfunk/mkdocs-material) from 9.4.14 to 9.5.3. - [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/9.4.14...9.5.3) --- updated-dependencies: - dependency-name: mkdocs-material dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 3fb85ca7..c3619d2d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -11,7 +11,7 @@ chardet==5.2.0 # Documentation mkdocs==1.5.3 mkautodoc==0.2.0 -mkdocs-material==9.4.14 +mkdocs-material==9.5.3 # Packaging build==1.0.3 From ea3071642d12ed546d901861a5901da6fad37073 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:14:26 +0400 Subject: [PATCH 2/7] Bump ruff from 0.1.6 to 0.1.9 (#3031) Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.6 to 0.1.9. - [Release notes](https://github.com/astral-sh/ruff/releases) - [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md) - [Commits](https://github.com/astral-sh/ruff/compare/v0.1.6...v0.1.9) --- updated-dependencies: - dependency-name: ruff dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index c3619d2d..af1caa5c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ coverage[toml]==7.3.0 cryptography==41.0.7 mypy==1.5.1 pytest==7.4.3 -ruff==0.1.6 +ruff==0.1.9 trio==0.22.2 trio-typing==0.10.0 trustme==1.1.0 From f1ed7463086f0aed97afa61a1197c51840d3bb2e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:36:16 +0400 Subject: [PATCH 3/7] Bump actions/setup-python from 4 to 5 (#3036) Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com> --- .github/workflows/publish.yml | 2 +- .github/workflows/test-suite.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 4ceb8c69..2c7cfb9f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: "actions/checkout@v4" - - uses: "actions/setup-python@v4" + - uses: "actions/setup-python@v5" with: python-version: 3.8 - name: "Install dependencies" diff --git a/.github/workflows/test-suite.yml b/.github/workflows/test-suite.yml index c3ad08f1..0bb570ce 100644 --- a/.github/workflows/test-suite.yml +++ b/.github/workflows/test-suite.yml @@ -18,7 +18,7 @@ jobs: steps: - uses: "actions/checkout@v4" - - uses: "actions/setup-python@v4" + - uses: "actions/setup-python@v5" with: python-version: "${{ matrix.python-version }}" allow-prereleases: true From 4ddff16bbe41c0bc4b8a5ea3a2c204d8e99478f3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 09:44:26 +0400 Subject: [PATCH 4/7] Bump coverage[toml] from 7.3.0 to 7.4.0 (#3034) Bumps [coverage[toml]](https://github.com/nedbat/coveragepy) from 7.3.0 to 7.4.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/7.3.0...7.4.0) --- updated-dependencies: - dependency-name: coverage[toml] dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index af1caa5c..5b737a2c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -18,7 +18,7 @@ build==1.0.3 twine==4.0.2 # Tests & Linting -coverage[toml]==7.3.0 +coverage[toml]==7.4.0 cryptography==41.0.7 mypy==1.5.1 pytest==7.4.3 From ebc1393c5cf6430e3027bdb724368a9d6e3429ef Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 3 Jan 2024 11:18:02 +0400 Subject: [PATCH 5/7] Bump pytest from 7.4.3 to 7.4.4 (#3032) Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.3 to 7.4.4. - [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/7.4.3...7.4.4) --- updated-dependencies: - dependency-name: pytest dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com> --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 5b737a2c..c7b24a89 100644 --- a/requirements.txt +++ b/requirements.txt @@ -21,7 +21,7 @@ twine==4.0.2 coverage[toml]==7.4.0 cryptography==41.0.7 mypy==1.5.1 -pytest==7.4.3 +pytest==7.4.4 ruff==0.1.9 trio==0.22.2 trio-typing==0.10.0 From c6907c22034e2739c4c1af89908e3c9f90602788 Mon Sep 17 00:00:00 2001 From: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com> Date: Thu, 4 Jan 2024 19:03:09 +0400 Subject: [PATCH 6/7] Remove unused type: ignore (#3038) * Remove unused type: ignore * Bump mypy version * Revert "Bump mypy version" This reverts commit 55b44b5d2f6f6b6417c197c653a43e3db3bf8804. * Bump mypy --------- Co-authored-by: Tom Christie --- httpx/_config.py | 2 +- httpx/_multipart.py | 4 ++-- requirements.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/httpx/_config.py b/httpx/_config.py index 05c096df..0cfd552e 100644 --- a/httpx/_config.py +++ b/httpx/_config.py @@ -185,7 +185,7 @@ class SSLConfig: ssl_context.load_cert_chain( certfile=self.cert[0], keyfile=self.cert[1], - password=self.cert[2], # type: ignore + password=self.cert[2], ) diff --git a/httpx/_multipart.py b/httpx/_multipart.py index 5122d511..1d451c38 100644 --- a/httpx/_multipart.py +++ b/httpx/_multipart.py @@ -104,9 +104,9 @@ class FileField: if len(value) == 2: # neither the 3rd parameter (content_type) nor the 4th (headers) # was included - filename, fileobj = value # type: ignore + filename, fileobj = value elif len(value) == 3: - filename, fileobj, content_type = value # type: ignore + filename, fileobj, content_type = value else: # all 4 parameters included filename, fileobj, content_type, headers = value # type: ignore diff --git a/requirements.txt b/requirements.txt index c7b24a89..218f06c6 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,7 @@ twine==4.0.2 # Tests & Linting coverage[toml]==7.4.0 cryptography==41.0.7 -mypy==1.5.1 +mypy==1.8.0 pytest==7.4.4 ruff==0.1.9 trio==0.22.2 From ca51b4532a4495c38c8abf1a393dbd80099deae3 Mon Sep 17 00:00:00 2001 From: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com> Date: Mon, 8 Jan 2024 15:09:14 +0400 Subject: [PATCH 7/7] Keep clients in sync (#3042) * Keep clients in sync * Update httpx/_client.py * Update httpx/_client.py --- httpx/_client.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/httpx/_client.py b/httpx/_client.py index 422bf0fa..a0b4209c 100644 --- a/httpx/_client.py +++ b/httpx/_client.py @@ -598,6 +598,8 @@ class Client(BaseClient): to authenticate the client. Either a path to an SSL certificate file, or two-tuple of (certificate file, key file), or a three-tuple of (certificate file, key file, password). + * **http2** - *(optional)* A boolean indicating if HTTP/2 support should be + enabled. Defaults to `False`. * **proxy** - *(optional)* A proxy URL where all the traffic should be routed. * **proxies** - *(optional)* A dictionary mapping proxy keys to proxy URLs. @@ -1311,6 +1313,8 @@ class AsyncClient(BaseClient): An asynchronous HTTP client, with connection pooling, HTTP/2, redirects, cookie persistence, etc. + It can be shared between tasks. + Usage: ```python @@ -1544,6 +1548,15 @@ class AsyncClient(BaseClient): [0]: /advanced/#merging-of-configuration """ + + if cookies is not None: # pragma: no cover + message = ( + "Setting per-request cookies=<...> is being deprecated, because " + "the expected behaviour on cookie persistence is ambiguous. Set " + "cookies directly on the client instance instead." + ) + warnings.warn(message, DeprecationWarning) + request = self.build_request( method=method, url=url, @@ -1656,7 +1669,7 @@ class AsyncClient(BaseClient): return response - except BaseException as exc: # pragma: no cover + except BaseException as exc: await response.aclose() raise exc