Skip to content

Commit 2c41e94

Browse files
Dependency updates (#3415)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 94d7159 commit 2c41e94

File tree

9 files changed

+29
-18
lines changed

9 files changed

+29
-18
lines changed

docs-requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# uv pip compile --universal --python-version=3.11 docs-requirements.in -o docs-requirements.txt
33
alabaster==1.0.0
44
# via sphinx
5-
attrs==25.4.0
5+
attrs==26.1.0
66
# via
77
# -r docs-requirements.in
88
# outcome
@@ -24,7 +24,7 @@ colorama==0.4.6 ; sys_platform == 'win32'
2424
# via
2525
# click
2626
# sphinx
27-
cryptography==46.0.5
27+
cryptography==46.0.6
2828
# via pyopenssl
2929
docutils==0.22.4
3030
# via
@@ -53,11 +53,11 @@ packaging==26.0
5353
# via sphinx
5454
pycparser==3.0 ; (implementation_name != 'PyPy' and os_name == 'nt') or (implementation_name != 'PyPy' and platform_python_implementation != 'PyPy')
5555
# via cffi
56-
pygments==2.19.2
56+
pygments==2.20.0
5757
# via sphinx
5858
pyopenssl==26.0.0
5959
# via -r docs-requirements.in
60-
requests==2.32.5
60+
requests==2.33.1
6161
# via sphinx
6262
roman-numerals==4.1.0
6363
# via sphinx

src/trio/_core/_local.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,11 @@ def get(self, default: T | type[_NoValue] = _NoValue) -> T:
4949
raise RuntimeError("Cannot be used outside of a run context") from None
5050
except KeyError:
5151
# contextvars consistency
52-
# `type: ignore` awaiting https://github.com/python/mypy/issues/15553 to be fixed & released
5352
if default is not _NoValue:
54-
return default # type: ignore[return-value]
53+
return default
5554

5655
if self._default is not _NoValue:
57-
return self._default # type: ignore[return-value]
56+
return self._default
5857

5958
raise LookupError(self) from None
6059

src/trio/_core/_tests/test_asyncgen.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,12 @@ def test_delegation_to_existing_hooks() -> None:
306306

307307
def my_firstiter(agen: AsyncGenerator[object, NoReturn]) -> None:
308308
assert isinstance(agen, AsyncGeneratorType)
309+
assert agen.ag_frame is not None
309310
record.append("firstiter " + agen.ag_frame.f_locals["arg"])
310311

311312
def my_finalizer(agen: AsyncGenerator[object, NoReturn]) -> None:
312313
assert isinstance(agen, AsyncGeneratorType)
314+
assert agen.ag_frame is not None
313315
record.append("finalizer " + agen.ag_frame.f_locals["arg"])
314316

315317
async def example(arg: str) -> AsyncGenerator[int, None]:

src/trio/_path.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,9 @@ def __repr__(self) -> str:
263263
if sys.version_info >= (3, 13):
264264
full_match = _wrap_method(pathlib.Path.full_match)
265265

266+
# TODO: only allow this for Python <3.19.
266267
def as_uri(self) -> str:
267-
return pathlib.Path.as_uri(self)
268+
return pathlib.PurePath.as_uri(self)
268269

269270

270271
if Path.relative_to.__doc__: # pragma: no branch

src/trio/_socket.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ def fromshare(info: bytes) -> SocketType:
338338
else:
339339
FamilyDefault: None = None
340340
FamilyT: TypeAlias = int | AddressFamily | None
341-
TypeT: TypeAlias = _stdlib_socket.socket | int
341+
TypeT: TypeAlias = _stdlib_socket.SocketKind | int
342342

343343

344344
@_wraps(_stdlib_socket.socketpair, assigned=(), updated=())

src/trio/_tests/test_exports.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@ def _ensure_mypy_cache_updated() -> None:
5252
"--config-file=",
5353
"--cache-dir=./.mypy_cache",
5454
"--no-error-summary",
55+
# TODO: update our tests to use the exposed APIs
56+
# instead of reading JSON... or use dmypy?
57+
"--no-fixed-format-cache",
58+
"--no-sqlite-cache",
5559
"-c",
5660
"import trio",
5761
],

src/trio/_tests/test_path.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
import pathlib
5+
import sys
56
from typing import TYPE_CHECKING
67

78
import pytest
@@ -230,6 +231,9 @@ async def test_globmethods(path: trio.Path) -> None:
230231
assert entries == {"_bar.txt", "bar.txt"}
231232

232233

234+
@pytest.mark.xfail(
235+
sys.version_info >= (3, 14), reason="we need to update `as_uri` to use Path.as_uri"
236+
)
233237
async def test_as_uri(path: trio.Path) -> None:
234238
path = await path.parent.resolve()
235239

src/trio/_util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,8 @@ def name_asyncgen(agen: AsyncGeneratorType[object, NoReturn]) -> str:
298298
if not hasattr(agen, "ag_code"): # pragma: no cover
299299
return repr(agen)
300300
try:
301-
module = agen.ag_frame.f_globals["__name__"]
301+
# `agen.ag_frame` can be None, but we catch AttributeError.
302+
module = agen.ag_frame.f_globals["__name__"] # type: ignore[union-attr]
302303
except (AttributeError, KeyError):
303304
module = f"<{agen.ag_code.co_filename}>"
304305
try:

test-requirements.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ astroid==4.0.4
88
# via pylint
99
async-generator==1.10
1010
# via -r test-requirements.in
11-
attrs==25.4.0
11+
attrs==26.1.0
1212
# via
1313
# -r test-requirements.in
1414
# outcome
@@ -38,7 +38,7 @@ colorama==0.4.6 ; sys_platform == 'win32'
3838
# sphinx
3939
coverage==7.13.5
4040
# via -r test-requirements.in
41-
cryptography==46.0.5
41+
cryptography==46.0.6
4242
# via
4343
# -r test-requirements.in
4444
# pyopenssl
@@ -83,7 +83,7 @@ markupsafe==3.0.3
8383
# via jinja2
8484
mccabe==0.7.0
8585
# via pylint
86-
mypy==1.19.1 ; implementation_name == 'cpython'
86+
mypy==1.20.0 ; implementation_name == 'cpython'
8787
# via -r test-requirements.in
8888
mypy-extensions==1.1.0
8989
# via
@@ -119,7 +119,7 @@ pre-commit==4.5.1
119119
# via -r test-requirements.in
120120
pycparser==3.0 ; (implementation_name != 'PyPy' and os_name == 'nt') or (implementation_name != 'PyPy' and platform_python_implementation != 'PyPy')
121121
# via cffi
122-
pygments==2.19.2
122+
pygments==2.20.0
123123
# via
124124
# pytest
125125
# sphinx
@@ -131,13 +131,13 @@ pyright==1.1.408
131131
# via -r test-requirements.in
132132
pytest==9.0.2
133133
# via -r test-requirements.in
134-
python-discovery==1.2.0
134+
python-discovery==1.2.1
135135
# via virtualenv
136136
pytokens==0.4.1 ; implementation_name == 'cpython'
137137
# via black
138138
pyyaml==6.0.3
139139
# via pre-commit
140-
requests==2.32.5
140+
requests==2.33.1
141141
# via sphinx
142142
roman-numerals==4.1.0 ; python_full_version >= '3.11'
143143
# via sphinx
@@ -167,7 +167,7 @@ sphinxcontrib-qthelp==2.0.0
167167
# via sphinx
168168
sphinxcontrib-serializinghtml==2.0.0
169169
# via sphinx
170-
tomli==2.4.0 ; python_full_version < '3.11'
170+
tomli==2.4.1 ; python_full_version < '3.11'
171171
# via
172172
# black
173173
# mypy
@@ -182,7 +182,7 @@ types-cffi==2.0.0.20260316
182182
# via
183183
# -r test-requirements.in
184184
# types-pyopenssl
185-
types-docutils==0.22.3.20260316
185+
types-docutils==0.22.3.20260322
186186
# via -r test-requirements.in
187187
types-pyopenssl==24.1.0.20240722
188188
# via -r test-requirements.in

0 commit comments

Comments
 (0)