From e5d6016c8054a9b31f777e01bd400aa26bd6730d Mon Sep 17 00:00:00 2001 From: asrelo <47759736+asrelo@users.noreply.github.com> Date: Tue, 31 Dec 2024 20:09:39 +0300 Subject: [PATCH 1/3] Clarify purpose of parameters `allow_redirects`, `max_redirects` for `ClientSession.request` (and related functions) (#10283) --- docs/client_reference.rst | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/docs/client_reference.rst b/docs/client_reference.rst index 9a76bfbd14b..a237bc10214 100644 --- a/docs/client_reference.rst +++ b/docs/client_reference.rst @@ -436,11 +436,16 @@ The client session supports the context manager protocol for self closing. :param aiohttp.BasicAuth auth: an object that represents HTTP Basic Authorization (optional) - :param bool allow_redirects: If set to ``False``, do not follow redirects. - ``True`` by default (optional). + :param bool allow_redirects: Whether to process redirects or not. + When ``True``, redirects are followed (up to ``max_redirects`` times) + and logged into :attr:`ClientResponse.history` and ``trace_configs``. + When ``False``, the original response is returned. + ``True`` by default (optional). :param int max_redirects: Maximum number of redirects to follow. - ``10`` by default. + :exc:`TooManyRedirects` is raised if the number is exceeded. + Ignored when ``allow_redirects=False``. + ``10`` by default. :param bool compress: Set to ``True`` if request has to be compressed with deflate encoding. If `compress` can not be combined @@ -542,8 +547,11 @@ The client session supports the context manager protocol for self closing. :param url: Request URL, :class:`str` or :class:`~yarl.URL` - :param bool allow_redirects: If set to ``False``, do not follow redirects. - ``True`` by default (optional). + :param bool allow_redirects: Whether to process redirects or not. + When ``True``, redirects are followed and logged into + :attr:`ClientResponse.history`. + When ``False``, the original response is returned. + ``True`` by default (optional). :return ClientResponse: a :class:`client response ` object. @@ -611,8 +619,11 @@ The client session supports the context manager protocol for self closing. :param url: Request URL, :class:`str` or :class:`~yarl.URL` - :param bool allow_redirects: If set to ``False``, do not follow redirects. - ``False`` by default (optional). + :param bool allow_redirects: Whether to process redirects or not. + When ``True``, redirects are followed and logged into + :attr:`ClientResponse.history`. + When ``False``, the original response is returned. + ``False`` by default (optional). :return ClientResponse: a :class:`client response ` object. @@ -629,8 +640,11 @@ The client session supports the context manager protocol for self closing. :param url: Request URL, :class:`str` or :class:`~yarl.URL` - :param bool allow_redirects: If set to ``False``, do not follow redirects. - ``True`` by default (optional). + :param bool allow_redirects: Whether to process redirects or not. + When ``True``, redirects are followed and logged into + :attr:`ClientResponse.history`. + When ``False``, the original response is returned. + ``True`` by default (optional). :return ClientResponse: a :class:`client response ` object. @@ -862,8 +876,11 @@ certification chaining. :param aiohttp.BasicAuth auth: an object that represents HTTP Basic Authorization (optional) - :param bool allow_redirects: If set to ``False``, do not follow redirects. - ``True`` by default (optional). + :param bool allow_redirects: Whether to process redirects or not. + When ``True``, redirects are followed (up to ``max_redirects`` times) + and logged into :attr:`ClientResponse.history` and ``trace_configs``. + When ``False``, the original response is returned. + ``True`` by default (optional). :param aiohttp.protocol.HttpVersion version: Request HTTP version (optional) From d54b3e2712bb40644752f35787f701fef792f969 Mon Sep 17 00:00:00 2001 From: Simon Lamon <32477463+silamon@users.noreply.github.com> Date: Wed, 1 Jan 2025 13:30:52 +0100 Subject: [PATCH 2/3] Update workflow to use upload-artifact v4 and download-artifact v4 This updates the CI/CD workflow to use the `upload-artifact` v4 and `download-artifact` v4 GitHub Actions. The currently used `upload-artifact` and `download-artifact` will no longer work at the end of next month. The changes are needed since v4 no longer has mutable artifacts, which was used to collect wheels from different architectures. Fixes #8588, fixes #8589, fixes #9009, fixes #10189, fixes #10191. PR #10281. --- .github/workflows/ci-cd.yml | 28 +++++++++++++++++----------- CHANGES/10281.contrib.rst | 1 + 2 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 CHANGES/10281.contrib.rst diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2ebc795ef22..bc7c8fbefad 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -127,7 +127,7 @@ jobs: run: | make generate-llhttp - name: Upload llhttp generated files - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: llhttp path: vendor/llhttp/build @@ -193,7 +193,7 @@ jobs: python -m pip install -r requirements/test.in -c requirements/test.txt - name: Restore llhttp generated files if: ${{ matrix.no-extensions == '' }} - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: llhttp path: vendor/llhttp/build/ @@ -280,7 +280,7 @@ jobs: run: | python -m pip install -r requirements/test.in -c requirements/test.txt - name: Restore llhttp generated files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: llhttp path: vendor/llhttp/build/ @@ -344,7 +344,7 @@ jobs: python -m pip install -r requirements/cython.in -c requirements/cython.txt - name: Restore llhttp generated files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: llhttp path: vendor/llhttp/build/ @@ -355,9 +355,9 @@ jobs: run: | python -m build --sdist - name: Upload artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: dist + name: dist-sdist path: dist build-wheels: @@ -410,7 +410,7 @@ jobs: python -m pip install -r requirements/cython.in -c requirements/cython.txt - name: Restore llhttp generated files - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: llhttp path: vendor/llhttp/build/ @@ -421,9 +421,15 @@ jobs: uses: pypa/cibuildwheel@v2.22.0 env: CIBW_ARCHS_MACOS: x86_64 arm64 universal2 - - uses: actions/upload-artifact@v3 + - name: Upload wheels + uses: actions/upload-artifact@v4 with: - name: dist + name: >- + dist-${{ matrix.os }}-${{ + matrix.qemu + && matrix.qemu + || 'native' + }} path: ./wheelhouse/*.whl deploy: @@ -448,10 +454,10 @@ jobs: run: | echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token - name: Download distributions - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: dist path: dist + pattern: dist-* - name: Collected dists run: | tree dist diff --git a/CHANGES/10281.contrib.rst b/CHANGES/10281.contrib.rst new file mode 100644 index 00000000000..b50b4d2f955 --- /dev/null +++ b/CHANGES/10281.contrib.rst @@ -0,0 +1 @@ +The CI/CD workflow has been updated to use `upload-artifact` v4 and `download-artifact` v4 GitHub Actions -- by :user:`silamon`. From 07d43433c1c370b82a1d6782b259e7e5c137ed52 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 10:43:00 +0000 Subject: [PATCH 3/3] Bump trustme from 1.2.0 to 1.2.1 (#10290) Bumps [trustme](https://github.com/python-trio/trustme) from 1.2.0 to 1.2.1.
Release notes

Sourced from trustme's releases.

1.2.1

Bugfixes

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=trustme&package-manager=pip&previous-version=1.2.0&new-version=1.2.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- requirements/constraints.txt | 2 +- requirements/dev.txt | 2 +- requirements/lint.txt | 2 +- requirements/test.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 6fdb4968870..274117c4ccb 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -240,7 +240,7 @@ towncrier==23.11.0 # via # -r requirements/doc.in # sphinxcontrib-towncrier -trustme==1.2.0 ; platform_machine != "i686" +trustme==1.2.1 ; platform_machine != "i686" # via # -r requirements/lint.in # -r requirements/test.in diff --git a/requirements/dev.txt b/requirements/dev.txt index fcda90e2cea..bf05d08219d 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -231,7 +231,7 @@ towncrier==23.11.0 # via # -r requirements/doc.in # sphinxcontrib-towncrier -trustme==1.2.0 ; platform_machine != "i686" +trustme==1.2.1 ; platform_machine != "i686" # via # -r requirements/lint.in # -r requirements/test.in diff --git a/requirements/lint.txt b/requirements/lint.txt index 351313233b6..c97b3405b30 100644 --- a/requirements/lint.txt +++ b/requirements/lint.txt @@ -91,7 +91,7 @@ tomli==2.2.1 # mypy # pytest # slotscheck -trustme==1.2.0 +trustme==1.2.1 # via -r requirements/lint.in typing-extensions==4.12.2 # via diff --git a/requirements/test.txt b/requirements/test.txt index 1867fd71f83..0cfbfec2669 100644 --- a/requirements/test.txt +++ b/requirements/test.txt @@ -111,7 +111,7 @@ tomli==2.2.1 # coverage # mypy # pytest -trustme==1.2.0 ; platform_machine != "i686" +trustme==1.2.1 ; platform_machine != "i686" # via -r requirements/test.in typing-extensions==4.12.2 # via