From 259ae74b3421de5243b7d44604c4ddafe0c2abb6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:23:37 +0000 Subject: [PATCH 1/6] Bump pip from 26.1.2 to 26.2 (#13309) Bumps [pip](https://github.com/pypa/pip) from 26.1.2 to 26.2.
Changelog

Sourced from pip's changelog.

26.2 (2026-07-29)

Deprecations and Removals

Features

... (truncated)

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pip&package-manager=pip&previous-version=26.1.2&new-version=26.2)](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 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 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 2017ff8b303..29209b8ae88 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -161,7 +161,7 @@ packaging==26.2 # wheel pathspec==1.1.1 # via mypy -pip==26.1.2 +pip==26.2 # via pip-tools pip-tools==7.6.0 # via -r requirements/dev.in diff --git a/requirements/dev.txt b/requirements/dev.txt index 205e020c906..125239f61c7 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -158,7 +158,7 @@ packaging==26.2 # wheel pathspec==1.1.1 # via mypy -pip==26.1.2 +pip==26.2 # via pip-tools pip-tools==7.6.0 # via -r requirements/dev.in From 0dbe3d62fd80246b649a4db6dab40813beb91019 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:23:52 +0000 Subject: [PATCH 2/6] Bump github/codeql-action from 4.37.3 to 4.37.4 (#13308) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.37.3 to 4.37.4.
Release notes

Sourced from github/codeql-action's releases.

v4.37.4

  • This version of the CodeQL Action adds support for the tools input for the codeql-action/init step to be specified using a github-codeql-tools repository property. This feature will gradually be rolled out following the release of this version. Once rolled out, this allows for the CodeQL CLI version that is used in GitHub-managed workflows, such as Default Setup, to be set to a custom value. For example, customers who run into issues with rate limits when a new CodeQL CLI version is released can set the value to toolcache to always use the CodeQL CLI version that is available in the runner toolcache. For Advanced Setup workflows, the value provided for tools in the workflow definition always takes precedence unless the value of the repository property starts with !. #4037
  • Update default CodeQL bundle version to 2.26.2. #4051
Changelog

Sourced from github/codeql-action's changelog.

4.37.4 - 29 Jul 2026

  • This version of the CodeQL Action adds support for the tools input for the codeql-action/init step to be specified using a github-codeql-tools repository property. This feature will gradually be rolled out following the release of this version. Once rolled out, this allows for the CodeQL CLI version that is used in GitHub-managed workflows, such as Default Setup, to be set to a custom value. For example, customers who run into issues with rate limits when a new CodeQL CLI version is released can set the value to toolcache to always use the CodeQL CLI version that is available in the runner toolcache. For Advanced Setup workflows, the value provided for tools in the workflow definition always takes precedence unless the value of the repository property starts with !. #4037
  • Update default CodeQL bundle version to 2.26.2. #4051
Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github/codeql-action&package-manager=github_actions&previous-version=4.37.3&new-version=4.37.4)](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 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> --- .github/workflows/codeql.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 1a48f1b324d..a2201ec7c0a 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -29,17 +29,17 @@ jobs: uses: actions/checkout@v7 - name: Initialize CodeQL - uses: github/codeql-action/init@v4.37.3 + uses: github/codeql-action/init@v4.37.4 with: languages: ${{ matrix.language }} config-file: ./.github/codeql.yml queries: +security-and-quality - name: Autobuild - uses: github/codeql-action/autobuild@v4.37.3 + uses: github/codeql-action/autobuild@v4.37.4 if: ${{ matrix.language == 'python' || matrix.language == 'javascript' }} - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v4.37.3 + uses: github/codeql-action/analyze@v4.37.4 with: category: "/language:${{ matrix.language }}" From 9b70452f5bb356ce8ba508786f4c62e63222b50f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:34:28 +0000 Subject: [PATCH 3/6] Bump filelock from 3.32.0 to 3.32.2 (#13310) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [filelock](https://github.com/tox-dev/py-filelock) from 3.32.0 to 3.32.2.
Release notes

Sourced from filelock's releases.

3.32.2

What's Changed

Full Changelog: https://github.com/tox-dev/filelock/compare/3.32.1...3.32.2

Changelog

Sourced from filelock's changelog.

########### Changelog ###########

.. towncrier-draft-entries:: Unreleased

.. towncrier release notes start


3.32.2 (2026-07-29)


  • A SoftReadWriteLock or SoftFileLease acquire whose heartbeat thread fails to start now unlinks its marker and hands the claim back, instead of leaving an unrefreshed marker a peer takes while the caller believes it still holds the lock. :pr:691

3.32.1 (2026-07-26)


  • Canceling an AsyncSoftReadWriteLock acquire now releases the claim instead of leaking a marker whose heartbeat wedges every contender. :pr:686

3.32.0 (2026-07-21)


  • SoftReadWriteLock closes the directory handle it opens to scan for readers as soon as a scan stops early, rather than holding it until the generator is collected. :pr:685
  • Declare support for Python 3.15 and run the test suite against it and its free-threaded build, both currently in beta. :pr:683
  • The source distribution ships the capability probes the tests import, and reading one no longer needs coverage installed, so the suite runs from an unpacked sdist instead of failing on a missing coverage_pragmas. :pr:685

3.31.2 (2026-07-21)


  • filelock imports again on runtimes whose errno omits ENOTSUP, such as GraalPy, where importing the package raised ImportError. It probes the code instead, preferring ENOTSUP, falling back to EOPNOTSUPP where that name is absent, and dropping to ENOSYS/EXDEV where neither exists. Platforms defining ENOTSUP keep their behavior. :pr:681

3.31.1 (2026-07-20)


  • A SoftFileLease acquired on one thread keeps its claim when another thread fails to acquire the same lease object, so its heartbeat carries on refreshing the marker instead of being torn down and letting a peer take the live claim. :pr:680

... (truncated)

Commits
  • 9a6cc43 Release 3.32.2
  • 56879c7 🧪 test(unix): deflake sticky-bit concurrent-unlink on graalpy (#695)
  • ecf5be0 hand back the claim when a heartbeat thread fails to start (#691)
  • ee70d2e 🧪 test(soft-rw): deflake writer phase-2 peer-marker test (#694)
  • 1eb14dd Fix test failures on NetBSD (#689) (#693)
  • d81e859 build(deps): bump astral-sh/setup-uv from 8.3.2 to 9.0.0 (#692)
  • 6fbc905 [pre-commit.ci] pre-commit autoupdate (#690)
  • 34d1c38 build(deps): bump pypa/gh-action-pypi-publish from 1.14.0 to 1.14.1 (#688)
  • bf13ec7 Release 3.32.1
  • 887f114 build(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#687)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=filelock&package-manager=pip&previous-version=3.32.0&new-version=3.32.2)](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 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 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 29209b8ae88..3144a5fd626 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -85,7 +85,7 @@ exceptiongroup==1.3.1 # pytest execnet==2.1.2 # via pytest-xdist -filelock==3.32.0 +filelock==3.32.2 # via # python-discovery # virtualenv diff --git a/requirements/dev.txt b/requirements/dev.txt index 125239f61c7..5bee177fcf2 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -83,7 +83,7 @@ exceptiongroup==1.3.1 # pytest execnet==2.1.2 # via pytest-xdist -filelock==3.32.0 +filelock==3.32.2 # via # python-discovery # virtualenv diff --git a/requirements/lint.txt b/requirements/lint.txt index c7c84776f8a..d60522a0ef0 100644 --- a/requirements/lint.txt +++ b/requirements/lint.txt @@ -42,7 +42,7 @@ exceptiongroup==1.3.1 # via # aiofastnet # pytest -filelock==3.32.0 +filelock==3.32.2 # via # python-discovery # virtualenv From 12975720a6e93d4f03128ccb6330ec127745ebaf Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 3 Aug 2026 11:57:57 +0000 Subject: [PATCH 4/6] Bump virtualenv from 21.7.0 to 21.7.1 (#13314) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [virtualenv](https://github.com/pypa/virtualenv) from 21.7.0 to 21.7.1.
Release notes

Sourced from virtualenv's releases.

21.7.1

What's Changed

Full Changelog: https://github.com/pypa/virtualenv/compare/21.7.0...21.7.1

Changelog

Sourced from virtualenv's changelog.

Bugfixes - 21.7.1

  • Upgrade embedded wheels:

    • pip to 26.2 from 26.1.2 (:issue:u)

Improved Documentation - 21.7.1

  • Document that virtualenv.png is the official logo and virtualenv.svg is a simplified favicon-only mark - by :user:gaborbernat. (:issue:3199)

v21.7.0 (2026-07-21)


Commits
  • e46c8e9 release 21.7.1
  • b66560a Upgrade embedded pip/setuptools/wheel (#3201)
  • bf5f520 📝 docs(branding): clarify official logo vs favicon (#3200)
  • 8507c7b [pre-commit.ci] pre-commit autoupdate (#3197)
  • 694406a chore(deps): bump astral-sh/setup-uv from 8.3.2 to 9.0.0 (#3198)
  • b486255 chore(deps): bump pypa/gh-action-pypi-publish from 1.14.0 to 1.14.1 (#3196)
  • ac2ad97 chore(deps): bump actions/setup-python from 6.3.0 to 7.0.0 (#3195)
  • df94b34 chore(deps): bump actions/checkout from 7.0.0 to 7.0.1 (#3194)
  • See full diff in compare view

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 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/requirements/constraints.txt b/requirements/constraints.txt index 3144a5fd626..063d2cbe655 100644 --- a/requirements/constraints.txt +++ b/requirements/constraints.txt @@ -333,7 +333,7 @@ uvloop==0.22.1 ; platform_system != "Windows" # -r requirements/lint.in valkey==6.1.1 # via -r requirements/lint.in -virtualenv==21.7.0 +virtualenv==21.7.1 # via pre-commit wheel==0.47.0 # via pip-tools diff --git a/requirements/dev.txt b/requirements/dev.txt index 5bee177fcf2..87ad532db85 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -323,7 +323,7 @@ uvloop==0.22.1 ; platform_system != "Windows" and implementation_name == "cpytho # -r requirements/lint.in valkey==6.1.1 # via -r requirements/lint.in -virtualenv==21.7.0 +virtualenv==21.7.1 # via pre-commit wheel==0.47.0 # via pip-tools diff --git a/requirements/lint.txt b/requirements/lint.txt index d60522a0ef0..0e27dcc65bd 100644 --- a/requirements/lint.txt +++ b/requirements/lint.txt @@ -166,7 +166,7 @@ uvloop==0.22.1 ; platform_system != "Windows" # via -r requirements/lint.in valkey==6.1.1 # via -r requirements/lint.in -virtualenv==21.7.0 +virtualenv==21.7.1 # via pre-commit yarl==1.24.5 # via aiohttp From 58bae08b7e4831c6c184fe22233bfc19941c700b Mon Sep 17 00:00:00 2001 From: Rodrigo Nogueira Date: Mon, 3 Aug 2026 10:11:36 -0300 Subject: [PATCH 5/6] Add METH_QUERY and treat QUERY as an idempotent method (#13301) --- aiohttp/client.py | 5 ++++- aiohttp/hdrs.py | 1 + tests/test_test_utils.py | 25 ++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/aiohttp/client.py b/aiohttp/client.py index 481663128fd..9e634a66290 100644 --- a/aiohttp/client.py +++ b/aiohttp/client.py @@ -216,7 +216,10 @@ class _WSConnectOptions(TypedDict, total=False): # https://www.rfc-editor.org/rfc/rfc9110#section-9.2.2 -IDEMPOTENT_METHODS = frozenset({"GET", "HEAD", "OPTIONS", "TRACE", "PUT", "DELETE"}) +# https://www.rfc-editor.org/info/rfc10008/#section-1-12 +IDEMPOTENT_METHODS = frozenset( + {"GET", "HEAD", "OPTIONS", "TRACE", "PUT", "DELETE", "QUERY"} +) _RetType_co = TypeVar( "_RetType_co", diff --git a/aiohttp/hdrs.py b/aiohttp/hdrs.py index 1082da3f4cc..1f7aa7d7d7d 100644 --- a/aiohttp/hdrs.py +++ b/aiohttp/hdrs.py @@ -16,6 +16,7 @@ METH_PATCH: Final[str] = "PATCH" METH_POST: Final[str] = "POST" METH_PUT: Final[str] = "PUT" +METH_QUERY: Final[str] = "QUERY" METH_TRACE: Final[str] = "TRACE" METH_ALL: Final[set[str]] = { diff --git a/tests/test_test_utils.py b/tests/test_test_utils.py index 0d13b062bf0..068210bee0f 100644 --- a/tests/test_test_utils.py +++ b/tests/test_test_utils.py @@ -12,7 +12,7 @@ from yarl import URL import aiohttp -from aiohttp import web +from aiohttp import hdrs, web from aiohttp.helpers import HeadersDictProxy from aiohttp.test_utils import ( REUSE_ADDRESS, @@ -356,6 +356,29 @@ async def handler(request: web.Request) -> web.Response: assert num_requests == 2 +async def test_retry_persistent_connection_query_method( + aiohttp_client: AiohttpClient, +) -> None: + """QUERY is safe and idempotent, so it must trigger retry.""" + num_requests = 0 + + async def handler(request: web.Request) -> web.Response: + nonlocal num_requests + num_requests += 1 + if num_requests == 1: + request.protocol.force_close() + return web.Response() + + app = web.Application() + app.router.add_route(hdrs.METH_QUERY, "/", handler) + client = await aiohttp_client(app) + client.session._retry_connection = True + async with client.request(hdrs.METH_QUERY, "/") as resp: + assert resp.status == 200 + + assert num_requests == 2 + + async def test_server_context_manager(app: web.Application) -> None: async with TestServer(app) as server: async with aiohttp.ClientSession() as client: From d5d068cb541ab7df5ecca14515475f9d4a379c5e Mon Sep 17 00:00:00 2001 From: Javid Khan Date: Mon, 3 Aug 2026 18:42:41 +0530 Subject: [PATCH 6/6] parse cookie expires date as ascii-only (#13278) --- CHANGES/13278.bugfix.rst | 1 + aiohttp/cookiejar.py | 12 +++++++----- tests/test_cookiejar.py | 6 ++++++ 3 files changed, 14 insertions(+), 5 deletions(-) create mode 100644 CHANGES/13278.bugfix.rst diff --git a/CHANGES/13278.bugfix.rst b/CHANGES/13278.bugfix.rst new file mode 100644 index 00000000000..a036e50ada8 --- /dev/null +++ b/CHANGES/13278.bugfix.rst @@ -0,0 +1 @@ +Restricted cookie ``Expires`` date parsing to ASCII digits -- by :user:`dxbjavid`. diff --git a/aiohttp/cookiejar.py b/aiohttp/cookiejar.py index 8e945f3470d..d4e474ab98a 100644 --- a/aiohttp/cookiejar.py +++ b/aiohttp/cookiejar.py @@ -44,21 +44,23 @@ class CookieJar(AbstractCookieJar): """Implements cookie storage adhering to RFC 6265.""" + # https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1 DATE_TOKENS_RE = re.compile( r"[\x09\x20-\x2F\x3B-\x40\x5B-\x60\x7B-\x7E]*" - r"(?P[\x00-\x08\x0A-\x1F\d:a-zA-Z\x7F-\xFF]+)" + r"(?P[\x00-\x08\x0A-\x1F\d:a-zA-Z\x7F-\xFF]+)", + re.ASCII, ) - DATE_HMS_TIME_RE = re.compile(r"(\d{1,2}):(\d{1,2}):(\d{1,2})") + DATE_HMS_TIME_RE = re.compile(r"(\d{1,2}):(\d{1,2}):(\d{1,2})", re.ASCII) - DATE_DAY_OF_MONTH_RE = re.compile(r"(\d{1,2})") + DATE_DAY_OF_MONTH_RE = re.compile(r"(\d{1,2})", re.ASCII) DATE_MONTH_RE = re.compile( "(jan)|(feb)|(mar)|(apr)|(may)|(jun)|(jul)|(aug)|(sep)|(oct)|(nov)|(dec)", - re.I, + re.I | re.ASCII, ) - DATE_YEAR_RE = re.compile(r"(\d{2,4})") + DATE_YEAR_RE = re.compile(r"(\d{2,4})", re.ASCII) # calendar.timegm() fails for timestamps after datetime.datetime.max # Minus one as a loss of precision occurs when timestamp() is called. diff --git a/tests/test_cookiejar.py b/tests/test_cookiejar.py index 0c24df71c0b..9fa150a5d9a 100644 --- a/tests/test_cookiejar.py +++ b/tests/test_cookiejar.py @@ -141,6 +141,12 @@ def test_date_parsing() -> None: # Invalid time assert parse_func("Tue, 1 Jan 1970 77:88:99 GMT") is None + # Invalid digits + # https://datatracker.ietf.org/doc/html/rfc6265#section-5.1.1 + assert parse_func("Tue, ١ Jan ١٩٧٠ ٠٠:٠٠:٠٠ GMT") is None + assert parse_func("Tue, 1 Jan 1970 00:00:00 GMT") is None + assert parse_func("Tue, 1 Jan 1970 ٠٠:٠٠:٠٠ GMT") is None + def test_domain_matching() -> None: test_func = CookieJar._is_domain_match