Skip to content

Commit a413faa

Browse files
authored
[py] Bump Python package requirements to latest versions (#15731)
* updates dependencies in `py/pyproject.toml` for packaging * updates dependencies in `py/BUILD.bazel` for building/testing/packaging * updates dependency versions in `py/requirements.txt` * adds tox and its dependencies to `py/requirements.txt` * updates Python CI job to use new version of tox * adds missing pinned transient dependencies to `py/requirements.txt` * generates new `py/requirements_lock.txt` with updated hashes * fixes errors in tests that were failing due to deprecations in the newer version of PyTest * removes trove license classifier from packaging data since it is now deprecated (license is already specified through `project.license` metadata)
1 parent 128ba0e commit a413faa

File tree

11 files changed

+685
-481
lines changed

11 files changed

+685
-481
lines changed

.github/workflows/ci-python.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Install dependencies
2828
run: |
2929
python -m pip install --upgrade pip
30-
pip install tox==4.6.4
30+
pip install tox==4.25.0
3131
- name: Test with tox
3232
run: tox -c py/tox.ini
3333
env:
@@ -47,7 +47,7 @@ jobs:
4747
- name: Install dependencies
4848
run: |
4949
python -m pip install --upgrade pip
50-
pip install tox==4.6.4
50+
pip install tox==4.25.0
5151
- name: Test with tox
5252
run: tox -c py/tox.ini
5353
env:
@@ -69,7 +69,7 @@ jobs:
6969
- name: Install dependencies
7070
run: |
7171
python -m pip install --upgrade pip
72-
pip install tox==4.6.4
72+
pip install tox==4.25.0
7373
- name: Test with tox
7474
run: |
7575
tox -c py/tox.ini -- --cobertura-xml-report ci || true

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,6 @@ To run all of the linting tools:
231231
./go py:lint
232232
```
233233

234-
You need `tox` installed to run the linting tools (`pip install tox`).
235-
236234
#### Local Installation
237235

238236
To run Python code locally without building/installing the package, you must first install the dependencies:

py/BUILD.bazel

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ TEST_DEPS = [
7878
requirement("iniconfig"),
7979
requirement("importlib_metadata"),
8080
requirement("h11"),
81-
requirement("more_itertools"),
81+
requirement("more-itertools"),
8282
requirement("multidict"),
8383
requirement("outcome"),
8484
requirement("pluggy"),
@@ -198,7 +198,7 @@ py_library(
198198
deps = [
199199
requirement("urllib3"),
200200
requirement("trio"),
201-
requirement("trio_websocket"),
201+
requirement("trio-websocket"),
202202
requirement("certifi"),
203203
requirement("typing_extensions"),
204204
requirement("websocket-client"),
@@ -269,7 +269,6 @@ py_wheel(
269269
classifiers = [
270270
"Development Status :: 5 - Production/Stable",
271271
"Intended Audience :: Developers",
272-
"License :: OSI Approved :: Apache Software License",
273272
"Operating System :: POSIX",
274273
"Operating System :: Microsoft :: Windows",
275274
"Operating System :: MacOS :: MacOS X",
@@ -289,12 +288,12 @@ py_wheel(
289288
python_requires = ">=3.9",
290289
python_tag = "py3",
291290
requires = [
292-
"urllib3[socks]>=1.26,<3",
293-
"trio~=0.17",
294-
"trio-websocket~=0.9",
295-
"certifi>=2021.10.8",
296-
"typing_extensions~=4.9",
297-
"websocket-client~=1.8",
291+
"urllib3[socks]~=2.4.0",
292+
"trio~=0.30.0",
293+
"trio-websocket~=0.12.2",
294+
"certifi>=2025.4.26",
295+
"typing_extensions~=4.13.2",
296+
"websocket-client~=1.8.0",
298297
],
299298
strip_path_prefixes = [
300299
"py/",

py/conftest.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import os
1919
import platform
20+
from pathlib import Path
2021

2122
import pytest
2223

@@ -84,13 +85,12 @@ def pytest_addoption(parser):
8485
)
8586

8687

87-
def pytest_ignore_collect(path, config):
88+
def pytest_ignore_collect(collection_path, config):
8889
drivers_opt = config.getoption("drivers")
8990
_drivers = set(drivers).difference(drivers_opt or drivers)
9091
if drivers_opt:
9192
_drivers.add("unit")
92-
parts = path.dirname.split(os.path.sep)
93-
return len([d for d in _drivers if d.lower() in parts]) > 0
93+
return len([d for d in _drivers if d.lower() in collection_path.parts]) > 0
9494

9595

9696
def pytest_generate_tests(metafunc):
@@ -298,7 +298,7 @@ def server(request):
298298
# under Wayland, so we use XWayland instead.
299299
remote_env["MOZ_ENABLE_WAYLAND"] = "0"
300300

301-
if os.path.exists(jar_path):
301+
if Path(jar_path).exists():
302302
# use the grid server built by bazel
303303
server = Server(path=jar_path, env=remote_env)
304304
else:

py/pyproject.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ requires-python = "~=3.9"
1212
classifiers = [
1313
"Development Status :: 5 - Production/Stable",
1414
"Intended Audience :: Developers",
15-
"License :: OSI Approved :: Apache Software License",
1615
"Operating System :: POSIX",
1716
"Operating System :: Microsoft :: Windows",
1817
"Operating System :: MacOS :: MacOS X",
@@ -26,12 +25,12 @@ classifiers = [
2625
"Programming Language :: Python :: 3.13",
2726
]
2827
dependencies = [
29-
"urllib3[socks]>=1.26,<3",
30-
"trio~=0.17",
31-
"trio-websocket~=0.9",
32-
"certifi>=2021.10.8",
33-
"typing_extensions~=4.9",
34-
"websocket-client~=1.8",
28+
"urllib3[socks]~=2.4.0",
29+
"trio~=0.30.0",
30+
"trio-websocket~=0.12.2",
31+
"certifi>=2025.4.26",
32+
"typing_extensions~=4.13.2",
33+
"websocket-client~=1.8.0",
3534
]
3635

3736
[project.urls]

py/requirements.txt

Lines changed: 50 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,64 @@
11
async-generator==1.10
2-
attrs==23.2.0
3-
certifi==2023.11.17
4-
cffi==1.16.0
5-
cryptography==42.0.8
6-
secretstorage==3.3.3
7-
debugpy==1.8.11
2+
attrs==25.3.0
3+
cachetools==5.5.2
4+
certifi==2025.4.26
5+
cffi==1.17.1
6+
chardet==5.2.0
7+
charset-normalizer==3.4.2
8+
colorama==0.4.6
9+
cryptography==44.0.3
10+
debugpy==1.8.14
11+
distlib==0.3.9
12+
docutils==0.21.2
13+
filelock==3.18.0
814
filetype==1.2.0
9-
h11==0.14.0
15+
h11==0.16.0
16+
id==1.5.0
1017
idna==3.10
11-
importlib-metadata==6.8.0
18+
importlib_metadata==8.7.0
1219
inflection==0.5.1
13-
iniconfig==2.0.0
14-
more-itertools==10.1.0
15-
multidict==6.0.5
20+
iniconfig==2.1.0
21+
jaraco.classes==3.4.0
22+
jaraco.context==6.0.1
23+
jaraco.functools==4.1.0
24+
jeepney==0.9.0
25+
keyring==25.6.0
26+
markdown-it-py==3.0.0
27+
mdurl==0.1.2
28+
more-itertools==10.7.0
29+
multidict==6.4.3
30+
nh3==0.2.21
1631
outcome==1.3.0.post0
17-
packaging==23.2
18-
pluggy==1.3.0
32+
packaging==25.0
33+
platformdirs==4.3.8
34+
pluggy==1.5.0
1935
py==1.11.0
20-
pycparser==2.21
21-
pyOpenSSL==22.0.0
22-
pyparsing==3.1.2
36+
pycparser==2.22
37+
Pygments==2.19.1
38+
pyOpenSSL==25.0.0
39+
pyparsing==3.2.3
40+
pyproject-api==1.9.0
2341
PySocks==1.7.1
24-
pytest==7.4.4
42+
pytest==8.3.5
2543
pytest-instafail==0.5.0
26-
pytest-mock==3.12.0
44+
pytest-mock==3.14.0
2745
pytest-trio==0.8.0
46+
readme_renderer==44.0
47+
requests==2.32.3
48+
requests-toolbelt==1.0.0
49+
rfc3986==2.0.0
50+
rich==14.0.0
51+
SecretStorage==3.3.3
2852
sniffio==1.3.1
2953
sortedcontainers==2.4.0
3054
toml==0.10.2
31-
trio>=0.20.2
32-
trio-websocket==0.9.2
33-
twine==4.0.2
34-
typing_extensions==4.9.0
35-
urllib3[socks]==2.0.7
55+
tox==4.25.0
56+
trio==0.30.0
57+
trio-websocket==0.12.2
58+
twine==6.1.0
59+
typing_extensions==4.13.2
60+
urllib3[socks]==2.4.0
61+
virtualenv==20.31.2
3662
websocket-client==1.8.0
3763
wsproto==1.2.0
38-
zipp==3.17.0
64+
zipp==3.21.0

0 commit comments

Comments
 (0)