From 30703abef0872e482ea590666b89495573fecdf1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Sat, 1 Aug 2026 01:47:23 +0000 Subject: [PATCH 1/8] Dependency updates --- .pre-commit-config.yaml | 4 ++-- docs-requirements.txt | 16 ++++++++-------- test-requirements.txt | 39 +++++++++++++++++++-------------------- 3 files changed, 29 insertions(+), 30 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8f1f81558..34943123e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: hooks: - id: black - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.16.0 + rev: v0.16.1 hooks: - id: ruff-check types: [file] @@ -69,7 +69,7 @@ repos: additional_dependencies: ["pyyaml"] files: ^(test-requirements\.txt)|(\.pre-commit-config\.yaml)$ - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.11.32 + rev: 0.12.1 hooks: # Compile requirements - id: pip-compile diff --git a/docs-requirements.txt b/docs-requirements.txt index b9e55cac8..db0d2fa0c 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -10,13 +10,13 @@ babel==2.18.0 # via sphinx beautifulsoup4==4.15.0 # via sphinx-codeautolink -certifi==2026.6.17 +certifi==2026.7.22 # via requests -cffi==2.0.0 ; os_name == 'nt' or platform_python_implementation != 'PyPy' +cffi==2.1.0 ; os_name == 'nt' or platform_python_implementation != 'PyPy' # via # -r docs-requirements.in # cryptography -charset-normalizer==3.4.7 +charset-normalizer==3.4.9 # via requests click==8.4.2 # via towncrier @@ -24,7 +24,7 @@ colorama==0.4.6 ; sys_platform == 'win32' # via # click # sphinx -cryptography==48.0.0 +cryptography==49.0.0 # via pyopenssl docutils==0.22.4 # via @@ -55,7 +55,7 @@ pycparser==3.0 ; (implementation_name != 'PyPy' and os_name == 'nt') or (impleme # via cffi pygments==2.20.0 # via sphinx -pyopenssl==26.2.0 +pyopenssl==26.3.0 # via -r docs-requirements.in requests==2.34.2 # via sphinx @@ -67,7 +67,7 @@ snowballstemmer==3.1.1 # via sphinx sortedcontainers==2.4.0 # via -r docs-requirements.in -soupsieve==2.8.4 +soupsieve==2.9.1 # via beautifulsoup4 sphinx==9.0.4 ; python_full_version < '3.12' # via @@ -83,7 +83,7 @@ sphinx==9.1.0 ; python_full_version >= '3.12' # sphinx-rtd-theme # sphinxcontrib-jquery # sphinxcontrib-trio -sphinx-codeautolink==0.18.1 +sphinx-codeautolink==0.19.0 # via -r docs-requirements.in sphinx-rtd-theme==3.1.0 # via -r docs-requirements.in @@ -107,7 +107,7 @@ sphinxcontrib-trio==1.2.0 # via -r docs-requirements.in towncrier==25.8.0 # via -r docs-requirements.in -typing-extensions==4.15.0 +typing-extensions==4.16.0 # via # beautifulsoup4 # exceptiongroup diff --git a/test-requirements.txt b/test-requirements.txt index db1354ea1..5dca12a7a 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -18,15 +18,15 @@ babel==2.18.0 # via sphinx black==26.5.1 ; implementation_name == 'cpython' # via -r test-requirements.in -certifi==2026.6.17 +certifi==2026.7.22 # via requests -cffi==2.0.0 ; os_name == 'nt' or platform_python_implementation != 'PyPy' +cffi==2.1.0 ; os_name == 'nt' or platform_python_implementation != 'PyPy' # via # -r test-requirements.in # cryptography cfgv==3.5.0 # via pre-commit -charset-normalizer==3.4.7 +charset-normalizer==3.4.9 # via requests click==8.4.2 ; implementation_name == 'cpython' # via black @@ -40,7 +40,7 @@ colorama==0.4.6 ; sys_platform == 'win32' # sphinx coverage==7.15.2 # via -r test-requirements.in -cryptography==48.0.0 +cryptography==49.0.0 # via # -r test-requirements.in # pyopenssl @@ -58,7 +58,7 @@ exceptiongroup==1.3.1 ; python_full_version < '3.11' # via # -r test-requirements.in # pytest -filelock==3.29.4 +filelock==3.32.2 # via # python-discovery # virtualenv @@ -79,13 +79,13 @@ jedi==0.20.0 ; implementation_name == 'cpython' # via -r test-requirements.in jinja2==3.1.6 # via sphinx -librt==0.12.0 ; implementation_name == 'cpython' and platform_python_implementation != 'PyPy' +librt==0.13.0 ; implementation_name == 'cpython' and platform_python_implementation != 'PyPy' # via mypy markupsafe==3.0.3 # via jinja2 mccabe==0.7.0 # via pylint -mypy==2.1.0 ; implementation_name == 'cpython' +mypy==2.3.0 ; implementation_name == 'cpython' # via -r test-requirements.in mypy-extensions==1.1.0 # via @@ -109,15 +109,14 @@ pathspec==1.1.1 ; implementation_name == 'cpython' # via # black # mypy -platformdirs==4.10.0 +platformdirs==4.11.0 # via # black # pylint - # python-discovery # virtualenv pluggy==1.6.0 # via pytest -pre-commit==4.6.0 +pre-commit==4.6.1 # via -r test-requirements.in pycparser==3.0 ; (implementation_name != 'PyPy' and os_name == 'nt') or (implementation_name != 'PyPy' and platform_python_implementation != 'PyPy') # via cffi @@ -127,13 +126,13 @@ pygments==2.20.0 # sphinx pylint==4.0.6 # via -r test-requirements.in -pyopenssl==26.2.0 +pyopenssl==26.3.0 # via -r test-requirements.in pyright==1.1.411 # via -r test-requirements.in pytest==9.1.1 # via -r test-requirements.in -python-discovery==1.4.2 +python-discovery==1.5.1 # via virtualenv pytokens==0.4.1 ; implementation_name == 'cpython' # via black @@ -143,7 +142,7 @@ requests==2.34.2 # via sphinx roman-numerals==4.1.0 ; python_full_version >= '3.11' # via sphinx -ruff==0.16.0 +ruff==0.16.1 # via -r test-requirements.in sniffio==1.3.1 # via -r test-requirements.in @@ -176,7 +175,7 @@ tomli==2.4.1 ; python_full_version < '3.11' # pylint # pytest # sphinx -tomlkit==0.15.0 +tomlkit==0.15.1 # via pylint trustme==1.2.1 # via -r test-requirements.in @@ -184,15 +183,15 @@ types-cffi==2.0.0.20260518 # via # -r test-requirements.in # types-pyopenssl -types-docutils==0.22.3.20260518 +types-docutils==0.22.3.20260724 # via -r test-requirements.in types-pyopenssl==24.1.0.20240722 # via -r test-requirements.in -types-pyyaml==6.0.12.20260518 +types-pyyaml==6.0.12.20260724 # via -r test-requirements.in -types-setuptools==82.0.0.20260518 +types-setuptools==83.0.0.20260724 # via types-cffi -typing-extensions==4.15.0 +typing-extensions==4.16.0 # via # -r test-requirements.in # astroid @@ -205,7 +204,7 @@ typing-extensions==4.15.0 # virtualenv urllib3==2.7.0 # via requests -uv==0.11.32 +uv==0.12.1 # via -r test-requirements.in -virtualenv==21.5.1 +virtualenv==21.7.1 # via pre-commit From 7e1f8c7ce6a8e8a1362c286a9255bc0dfae1268d Mon Sep 17 00:00:00 2001 From: A5rocks Date: Sat, 1 Aug 2026 11:38:43 +0900 Subject: [PATCH 2/8] Downgrade cryptography --- docs-requirements.txt | 6 +++--- test-requirements.txt | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs-requirements.txt b/docs-requirements.txt index db0d2fa0c..ccd0b372e 100644 --- a/docs-requirements.txt +++ b/docs-requirements.txt @@ -12,7 +12,7 @@ beautifulsoup4==4.15.0 # via sphinx-codeautolink certifi==2026.7.22 # via requests -cffi==2.1.0 ; os_name == 'nt' or platform_python_implementation != 'PyPy' +cffi==2.0.0 ; os_name == 'nt' or platform_python_implementation != 'PyPy' # via # -r docs-requirements.in # cryptography @@ -24,7 +24,7 @@ colorama==0.4.6 ; sys_platform == 'win32' # via # click # sphinx -cryptography==49.0.0 +cryptography==48.0.0 # via pyopenssl docutils==0.22.4 # via @@ -55,7 +55,7 @@ pycparser==3.0 ; (implementation_name != 'PyPy' and os_name == 'nt') or (impleme # via cffi pygments==2.20.0 # via sphinx -pyopenssl==26.3.0 +pyopenssl==26.2.0 # via -r docs-requirements.in requests==2.34.2 # via sphinx diff --git a/test-requirements.txt b/test-requirements.txt index 5dca12a7a..e45cc9d78 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -40,7 +40,7 @@ colorama==0.4.6 ; sys_platform == 'win32' # sphinx coverage==7.15.2 # via -r test-requirements.in -cryptography==49.0.0 +cryptography==48.0.0 # via # -r test-requirements.in # pyopenssl @@ -126,7 +126,7 @@ pygments==2.20.0 # sphinx pylint==4.0.6 # via -r test-requirements.in -pyopenssl==26.3.0 +pyopenssl==26.2.0 # via -r test-requirements.in pyright==1.1.411 # via -r test-requirements.in From 506fbb689212670ddf12f0158a0e216eda96863f Mon Sep 17 00:00:00 2001 From: CoolCat467 <52022020+CoolCat467@users.noreply.github.com> Date: Sat, 1 Aug 2026 00:39:28 -0500 Subject: [PATCH 3/8] Resolve new mypy issues --- src/trio/_core/_tests/test_ki.py | 9 ++++++--- src/trio/_threads.py | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/trio/_core/_tests/test_ki.py b/src/trio/_core/_tests/test_ki.py index 8d09233d6..1ce4af9aa 100644 --- a/src/trio/_core/_tests/test_ki.py +++ b/src/trio/_core/_tests/test_ki.py @@ -32,6 +32,9 @@ Generator, Iterator, ) + from types import AsyncGeneratorType + + from typing_extensions import Never from ..._core import Abort, RaiseCancelT @@ -665,11 +668,11 @@ def _unprotected_gen_fn() -> Generator[None, None, None]: yield -async def _consume_async_generator(agen: AsyncGenerator[None, None]) -> None: +async def _consume_async_generator(agen: AsyncGeneratorType[object, Never]) -> None: try: with pytest.raises(StopAsyncIteration): while True: - await agen.asend(None) + await agen.asend(None) # type: ignore[arg-type] finally: await agen.aclose() @@ -684,7 +687,7 @@ def _consume_function_for_coverage( assert inspect.isgenerator(result) or inspect.iscoroutine(result) with pytest.raises(StopIteration): while True: - result.send(None) + result.send(None) # type: ignore[arg-type] def test_enable_disable_ki_protection_passes_on_inspect_flags() -> None: diff --git a/src/trio/_threads.py b/src/trio/_threads.py index 4b1e54f54..46de93563 100644 --- a/src/trio/_threads.py +++ b/src/trio/_threads.py @@ -357,7 +357,7 @@ async def to_thread_run_sync( task_register: list[trio.lowlevel.Task | None] = [trio.lowlevel.current_task()] # Holds a reference to the raise_cancel function provided if a cancellation # is attempted against this task - or None if no such delivery has happened. - cancel_register: list[RaiseCancelT | None] = [None] # type: ignore[assignment] + cancel_register: list[RaiseCancelT | None] = [None] name = f"trio.to_thread.run_sync-{next(_thread_counter)}" placeholder = ThreadPlaceholder(name) From 6f9b3239fbf5c0e2d628c8f045ad25ecae87a200 Mon Sep 17 00:00:00 2001 From: A5rocks Date: Sat, 1 Aug 2026 19:50:01 +0900 Subject: [PATCH 4/8] Is it cffi or uv? --- test-requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test-requirements.txt b/test-requirements.txt index e45cc9d78..71e201d56 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -20,7 +20,7 @@ black==26.5.1 ; implementation_name == 'cpython' # via -r test-requirements.in certifi==2026.7.22 # via requests -cffi==2.1.0 ; os_name == 'nt' or platform_python_implementation != 'PyPy' +cffi==2.0.0 ; os_name == 'nt' or platform_python_implementation != 'PyPy' # via # -r test-requirements.in # cryptography @@ -204,7 +204,7 @@ typing-extensions==4.16.0 # virtualenv urllib3==2.7.0 # via requests -uv==0.12.1 +uv==0.11.32 # via -r test-requirements.in virtualenv==21.7.1 # via pre-commit From 92cb963c79f6aead3752fe46be4af68ebe954e67 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 1 Aug 2026 10:50:17 +0000 Subject: [PATCH 5/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- test-requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-requirements.txt b/test-requirements.txt index 71e201d56..8b2013e96 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -204,7 +204,7 @@ typing-extensions==4.16.0 # virtualenv urllib3==2.7.0 # via requests -uv==0.11.32 +uv==0.12.1 # via -r test-requirements.in virtualenv==21.7.1 # via pre-commit From b3701d271c6c7fc2405f2a5a43ab011a3607f96a Mon Sep 17 00:00:00 2001 From: A5rocks Date: Sat, 1 Aug 2026 20:05:56 +0900 Subject: [PATCH 6/8] Is it uv? --- .pre-commit-config.yaml | 2 +- test-requirements.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 34943123e..cd2e3927c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,7 @@ repos: additional_dependencies: ["pyyaml"] files: ^(test-requirements\.txt)|(\.pre-commit-config\.yaml)$ - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.12.1 + rev: 0.11.32 hooks: # Compile requirements - id: pip-compile diff --git a/test-requirements.txt b/test-requirements.txt index 8b2013e96..71e201d56 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -204,7 +204,7 @@ typing-extensions==4.16.0 # virtualenv urllib3==2.7.0 # via requests -uv==0.12.1 +uv==0.11.32 # via -r test-requirements.in virtualenv==21.7.1 # via pre-commit From cb24b9df9eb5aa494beb0991482fb70d8b4fe794 Mon Sep 17 00:00:00 2001 From: A5rocks Date: Sun, 2 Aug 2026 14:32:20 +0900 Subject: [PATCH 7/8] Hopefully make CI pass --- .pre-commit-config.yaml | 2 +- src/trio/_tests/test_exports.py | 2 +- test-requirements.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cd2e3927c..34943123e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -69,7 +69,7 @@ repos: additional_dependencies: ["pyyaml"] files: ^(test-requirements\.txt)|(\.pre-commit-config\.yaml)$ - repo: https://github.com/astral-sh/uv-pre-commit - rev: 0.11.32 + rev: 0.12.1 hooks: # Compile requirements - id: pip-compile diff --git a/src/trio/_tests/test_exports.py b/src/trio/_tests/test_exports.py index f70da41b0..0b5eac41b 100644 --- a/src/trio/_tests/test_exports.py +++ b/src/trio/_tests/test_exports.py @@ -426,7 +426,7 @@ def lookup_symbol(symbol: str) -> dict[str, Any]: # type: ignore[misc, explicit extra = {e for e in extra if not e.endswith("AttrsAttributes__")} assert len(extra) == before - 1 - if issubclass(class_, trio.Path) and sys.version_info >= (3, 15): + if tool == "jedi" and issubclass(class_, trio.Path) and sys.version_info >= (3, 15): # needs a typeshed update for https://github.com/python/typeshed/pull/15737 extra.remove("is_reserved") diff --git a/test-requirements.txt b/test-requirements.txt index 71e201d56..8b2013e96 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -204,7 +204,7 @@ typing-extensions==4.16.0 # virtualenv urllib3==2.7.0 # via requests -uv==0.11.32 +uv==0.12.1 # via -r test-requirements.in virtualenv==21.7.1 # via pre-commit From 8e97eb1ae40e95fff2437027014e3487720d5c62 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sun, 2 Aug 2026 05:32:36 +0000 Subject: [PATCH 8/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/trio/_tests/test_exports.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/trio/_tests/test_exports.py b/src/trio/_tests/test_exports.py index 0b5eac41b..1c2b46ca4 100644 --- a/src/trio/_tests/test_exports.py +++ b/src/trio/_tests/test_exports.py @@ -426,7 +426,11 @@ def lookup_symbol(symbol: str) -> dict[str, Any]: # type: ignore[misc, explicit extra = {e for e in extra if not e.endswith("AttrsAttributes__")} assert len(extra) == before - 1 - if tool == "jedi" and issubclass(class_, trio.Path) and sys.version_info >= (3, 15): + if ( + tool == "jedi" + and issubclass(class_, trio.Path) + and sys.version_info >= (3, 15) + ): # needs a typeshed update for https://github.com/python/typeshed/pull/15737 extra.remove("is_reserved")