Skip to content

add Python 3.14 to CI #10872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,10 @@ jobs:
no-extensions: 'Y'
os: ubuntu
experimental: false
# - os: ubuntu
# pyver: "3.14"
# experimental: true
# no-extensions: 'Y'
- os: ubuntu
pyver: "3.14"
experimental: true
no-extensions: 'Y'
fail-fast: true
runs-on: ${{ matrix.os }}-latest
continue-on-error: ${{ matrix.experimental }}
Expand Down
14 changes: 6 additions & 8 deletions requirements/constraints.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/constraints.txt --resolver=backtracking --strip-extras requirements/constraints.in
# pip-compile --allow-unsafe --output-file=requirements/constraints.txt --strip-extras requirements/constraints.in
#
aiodns==3.4.0
# via
Expand Down Expand Up @@ -99,7 +99,7 @@ incremental==24.7.2
# via towncrier
iniconfig==2.1.0
# via pytest
isal==1.7.2
isal==1.7.2 ; python_version < "3.14"
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand Down Expand Up @@ -164,9 +164,7 @@ pygments==2.19.1
# rich
# sphinx
pyjwt==2.8.0
# via
# gidgethub
# pyjwt
# via gidgethub
pyproject-hooks==1.2.0
# via
# build
Expand All @@ -193,7 +191,7 @@ pytest-xdist==3.6.1
# via -r requirements/test.in
python-dateutil==2.9.0.post0
# via freezegun
python-on-whales==0.76.1
python-on-whales==0.76.1 ; python_version < "3.14"
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand Down
14 changes: 6 additions & 8 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/dev.txt --resolver=backtracking --strip-extras requirements/dev.in
# pip-compile --allow-unsafe --output-file=requirements/dev.txt --strip-extras requirements/dev.in
#
aiodns==3.4.0
# via
Expand Down Expand Up @@ -97,7 +97,7 @@ incremental==24.7.2
# via towncrier
iniconfig==2.1.0
# via pytest
isal==1.7.2
isal==1.7.2 ; python_version < "3.14"
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand Down Expand Up @@ -159,9 +159,7 @@ pygments==2.19.1
# rich
# sphinx
pyjwt==2.8.0
# via
# gidgethub
# pyjwt
# via gidgethub
pyproject-hooks==1.2.0
# via
# build
Expand All @@ -188,7 +186,7 @@ pytest-xdist==3.6.1
# via -r requirements/test.in
python-dateutil==2.9.0.post0
# via freezegun
python-on-whales==0.76.1
python-on-whales==0.76.1 ; python_version < "3.14"
# via
# -r requirements/lint.in
# -r requirements/test.in
Expand Down
2 changes: 1 addition & 1 deletion requirements/lint.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/lint.txt --strip-extras requirements/lint.in
Expand Down
4 changes: 2 additions & 2 deletions requirements/test.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
blockbuster
coverage
freezegun
isal
isal; python_version < "3.14" # no wheel for 3.14
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't worth doing. Basic dependencies (like multidict) will not have 3.14 compatible releases until atleast the release candidate is out. We don't really want a load of version checks that need to be removed again shortly.

mypy; implementation_name == "cpython"
proxy.py >= 2.4.4rc5
pytest
pytest-cov
pytest-mock
pytest-xdist
pytest_codspeed
python-on-whales
python-on-whales; python_version < "3.14" # no wheel for 3.14
setuptools-git
trustme; platform_machine != "i686" # no 32-bit wheels
wait-for-it
Expand Down
8 changes: 4 additions & 4 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by pip-compile with python 3.10
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --allow-unsafe --output-file=requirements/test.txt --resolver=backtracking --strip-extras requirements/test.in
# pip-compile --allow-unsafe --output-file=requirements/test.txt --strip-extras requirements/test.in
#
aiodns==3.4.0
# via -r requirements/runtime-deps.in
Expand Down Expand Up @@ -51,7 +51,7 @@ idna==3.6
# yarl
iniconfig==2.1.0
# via pytest
isal==1.7.2
isal==1.7.2 ; python_version < "3.14"
# via -r requirements/test.in
markdown-it-py==3.0.0
# via rich
Expand Down Expand Up @@ -104,7 +104,7 @@ pytest-xdist==3.6.1
# via -r requirements/test.in
python-dateutil==2.9.0.post0
# via freezegun
python-on-whales==0.76.1
python-on-whales==0.76.1 ; python_version < "3.14"
# via -r requirements/test.in
rich==14.0.0
# via pytest-codspeed
Expand Down
16 changes: 13 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
from unittest import mock
from uuid import uuid4

import isal.isal_zlib
import pytest
import zlib_ng.zlib_ng
from blockbuster import blockbuster_ctx

from aiohttp.client_proto import ResponseHandler
Expand All @@ -38,6 +36,16 @@
except ImportError:
uvloop = None # type: ignore[assignment]

try:
import zlib_ng.zlib_ng as zlib_ng
except ImportError:
zlib_ng = None # type: ignore[assignment]

try:
import isal.isal_zlib as isal_zlib
except ImportError:
isal_zlib = None # type: ignore[assignment]


pytest_plugins = ("aiohttp.pytest_plugin", "pytester")

Expand Down Expand Up @@ -321,11 +329,13 @@ def unused_port_socket() -> Generator[socket.socket, None, None]:
s.close()


@pytest.fixture(params=[zlib, zlib_ng.zlib_ng, isal.isal_zlib])
@pytest.fixture(params=[zlib, zlib_ng, isal_zlib])
def parametrize_zlib_backend(
request: pytest.FixtureRequest,
) -> Generator[None, None, None]:
original_backend: ZLibBackendProtocol = ZLibBackend._zlib_backend
if request.param is None:
pytest.xfail("zlib backend not available")
set_zlib_backend(request.param)

yield
Expand Down
Loading