Skip to content

Commit 397aefd

Browse files
kumaraditya303Dreamsorcerer
authored andcommitted
Adjust dependencies for Python 3.14 (#10872)
(cherry picked from commit ec38d25)
1 parent 98c9f31 commit 397aefd

File tree

6 files changed

+36
-34
lines changed

6 files changed

+36
-34
lines changed

CHANGES/10872.contrib.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Updated dependencies to allow testing on Python 3.14.

requirements/constraints.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.10
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --output-file=requirements/constraints.txt --resolver=backtracking --strip-extras requirements/constraints.in
5+
# pip-compile --allow-unsafe --output-file=requirements/constraints.txt --strip-extras requirements/constraints.in
66
#
77
aiodns==3.5.0
88
# via
@@ -99,7 +99,7 @@ imagesize==1.4.1
9999
# via sphinx
100100
iniconfig==2.1.0
101101
# via pytest
102-
isal==1.7.2
102+
isal==1.7.2 ; python_version < "3.14"
103103
# via
104104
# -r requirements/lint.in
105105
# -r requirements/test.in
@@ -156,9 +156,11 @@ pycares==4.10.0
156156
# via aiodns
157157
pycparser==2.22
158158
# via cffi
159-
pydantic==2.11.7
160-
# via python-on-whales
161-
pydantic-core==2.33.2
159+
pydantic==2.12.0a1
160+
# via
161+
# -r requirements/test.in
162+
# python-on-whales
163+
pydantic-core==2.37.2
162164
# via pydantic
163165
pyenchant==3.2.2
164166
# via sphinxcontrib-spelling
@@ -167,10 +169,8 @@ pygments==2.19.2
167169
# pytest
168170
# rich
169171
# sphinx
170-
pyjwt==2.9.0
171-
# via
172-
# gidgethub
173-
# pyjwt
172+
pyjwt==2.8.0
173+
# via gidgethub
174174
pyproject-hooks==1.2.0
175175
# via
176176
# build

requirements/dev.txt

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.10
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.10
3+
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --output-file=requirements/dev.txt --resolver=backtracking --strip-extras requirements/dev.in
5+
# pip-compile --allow-unsafe --output-file=requirements/dev.txt --strip-extras requirements/dev.in
66
#
77
aiodns==3.5.0
88
# via
@@ -97,7 +97,7 @@ imagesize==1.4.1
9797
# via sphinx
9898
iniconfig==2.1.0
9999
# via pytest
100-
isal==1.7.2
100+
isal==1.7.2 ; python_version < "3.14"
101101
# via
102102
# -r requirements/lint.in
103103
# -r requirements/test.in
@@ -153,19 +153,19 @@ pycares==4.10.0
153153
# via aiodns
154154
pycparser==2.22
155155
# via cffi
156-
pydantic==2.11.7
157-
# via python-on-whales
158-
pydantic-core==2.33.2
156+
pydantic==2.12.0a1
157+
# via
158+
# -r requirements/test.in
159+
# python-on-whales
160+
pydantic-core==2.37.2
159161
# via pydantic
160162
pygments==2.19.2
161163
# via
162164
# pytest
163165
# rich
164166
# sphinx
165167
pyjwt==2.8.0
166-
# via
167-
# gidgethub
168-
# pyjwt
168+
# via gidgethub
169169
pyproject-hooks==1.2.0
170170
# via
171171
# build

requirements/test.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
blockbuster
44
coverage
55
freezegun
6-
isal
6+
isal; python_version < "3.14" # no wheel for 3.14
77
mypy; implementation_name == "cpython"
88
pkgconfig
99
proxy.py >= 2.4.4rc5

requirements/test.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.10
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --output-file=requirements/test.txt --resolver=backtracking --strip-extras requirements/test.in
5+
# pip-compile --allow-unsafe --output-file=requirements/test.txt --strip-extras requirements/test.in
66
#
77
aiodns==3.5.0
88
# via -r requirements/runtime-deps.in
@@ -53,7 +53,7 @@ idna==3.4
5353
# yarl
5454
iniconfig==2.1.0
5555
# via pytest
56-
isal==1.7.2
56+
isal==1.7.2 ; python_version < "3.14"
5757
# via -r requirements/test.in
5858
markdown-it-py==3.0.0
5959
# via rich
@@ -89,9 +89,11 @@ pycares==4.10.0
8989
# via aiodns
9090
pycparser==2.22
9191
# via cffi
92-
pydantic==2.11.7
93-
# via python-on-whales
94-
pydantic-core==2.33.2
92+
pydantic==2.12.0a1
93+
# via
94+
# -r requirements/test.in
95+
# python-on-whales
96+
pydantic-core==2.37.2
9597
# via pydantic
9698
pygments==2.19.2
9799
# via

tests/conftest.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,14 @@
44
import socket
55
import ssl
66
import sys
7-
import zlib
87
from hashlib import md5, sha1, sha256
98
from pathlib import Path
109
from tempfile import TemporaryDirectory
1110
from typing import Any, AsyncIterator, Generator, Iterator
1211
from unittest import mock
1312
from uuid import uuid4
1413

15-
import isal.isal_zlib
1614
import pytest
17-
import zlib_ng.zlib_ng
1815
from blockbuster import blockbuster_ctx
1916

2017
from aiohttp import payload
@@ -251,6 +248,8 @@ def selector_loop() -> Iterator[asyncio.AbstractEventLoop]:
251248

252249
@pytest.fixture
253250
def uvloop_loop() -> Iterator[asyncio.AbstractEventLoop]:
251+
if uvloop is None:
252+
pytest.skip("uvloop is not installed")
254253
factory = uvloop.new_event_loop
255254
with loop_context(factory) as _loop:
256255
asyncio.set_event_loop(_loop)
@@ -331,13 +330,13 @@ def unused_port_socket() -> Generator[socket.socket, None, None]:
331330
s.close()
332331

333332

334-
@pytest.fixture(params=[zlib, zlib_ng.zlib_ng, isal.isal_zlib])
333+
@pytest.fixture(params=["zlib", "zlib_ng.zlib_ng", "isal.isal_zlib"])
335334
def parametrize_zlib_backend(
336335
request: pytest.FixtureRequest,
337336
) -> Generator[None, None, None]:
338337
original_backend: ZLibBackendProtocol = ZLibBackend._zlib_backend
339-
set_zlib_backend(request.param)
340-
338+
backend = pytest.importorskip(request.param)
339+
set_zlib_backend(backend)
341340
yield
342341

343342
set_zlib_backend(original_backend)

0 commit comments

Comments
 (0)