Skip to content

Commit 9b3f17a

Browse files
Kludexjairhenrique
andauthored
Support Python 3.14 (#2723)
Co-authored-by: Jair Henrique <[email protected]>
1 parent ce79f95 commit 9b3f17a

File tree

6 files changed

+453
-332
lines changed

6 files changed

+453
-332
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
19+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
2020
os: [windows-latest, ubuntu-latest, macos-latest]
2121

2222
steps:

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ classifiers = [
2727
"Programming Language :: Python :: 3.11",
2828
"Programming Language :: Python :: 3.12",
2929
"Programming Language :: Python :: 3.13",
30+
"Programming Language :: Python :: 3.14",
3031
"Programming Language :: Python :: Implementation :: CPython",
3132
"Programming Language :: Python :: Implementation :: PyPy",
3233
"Topic :: Internet :: WWW/HTTP",
@@ -60,7 +61,7 @@ dev = [
6061
"types-click==7.1.8",
6162
"types-pyyaml==6.0.12.20250402",
6263
"trustme==1.2.1",
63-
"cryptography==44.0.3",
64+
"cryptography>=44.0.3",
6465
"coverage==7.8.0",
6566
"coverage-conditional-plugin==0.9.0",
6667
"coverage-enable-subprocess==1.0",
@@ -132,6 +133,8 @@ filterwarnings = [
132133
"ignore: websockets.legacy is deprecated.*:DeprecationWarning",
133134
"ignore: websockets.server.WebSocketServerProtocol is deprecated.*:DeprecationWarning",
134135
"ignore: websockets.client.connect is deprecated.*:DeprecationWarning",
136+
# httptools in Python 3.14t needs the `PYTHON_GIL=0` environment variable, or raises a RuntimeWarning.
137+
"ignore: The global interpreter lock (GIL)*:RuntimeWarning"
135138
]
136139

137140
[tool.coverage.run]

tests/test_compat.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ def test_asyncio_run__custom_loop_factory() -> None:
2323

2424

2525
def test_asyncio_run__passing_a_non_awaitable_callback_should_throw_error() -> None:
26-
with pytest.raises(ValueError):
27-
asyncio_run(
28-
lambda: None, # type: ignore
29-
loop_factory=CustomLoop,
30-
)
26+
# TypeError on Python >= 3.14
27+
with pytest.raises((ValueError, TypeError)):
28+
asyncio_run(lambda: None, loop_factory=CustomLoop) # type: ignore

0 commit comments

Comments
 (0)