Skip to content

Commit 0641725

Browse files
committed
[py] Support Python 3.14 and drop Python 3.9 (SeleniumHQ#16342)
1 parent bcab315 commit 0641725

File tree

12 files changed

+170
-136
lines changed

12 files changed

+170
-136
lines changed

.github/workflows/bazel.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ on:
5151
required: false
5252
type: string
5353
default: ''
54+
python-version:
55+
description: Custom Python version to use
56+
required: false
57+
type: string
58+
default: ''
5459
ruby-version:
5560
description: Custom Ruby version to use
5661
required: false
@@ -101,6 +106,9 @@ jobs:
101106
if: inputs.os != 'windows'
102107
run: |
103108
sudo rm -rf "$CHROMEWEBDRIVER" "$EDGEWEBDRIVER" "$GECKOWEBDRIVER"
109+
- name: Set Python version
110+
if: inputs.python-version != ''
111+
run: echo '${{ inputs.python-version }}' > py/.python-version
104112
- name: Set Ruby version
105113
if: inputs.ruby-version != ''
106114
run: echo '${{ inputs.ruby-version }}' > rb/.ruby-version

.github/workflows/ci-python.yml

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,40 +16,38 @@ jobs:
1616
1717
docs:
1818
name: Documentation
19-
needs: build
2019
runs-on: ubuntu-latest
2120
steps:
2221
- name: Checkout source tree
2322
uses: actions/checkout@v4
24-
- name: Set up Python 3.9
23+
- name: Set up Python 3.10
2524
uses: actions/setup-python@v6
2625
with:
27-
python-version: 3.9
26+
python-version: '3.10'
2827
- name: Install dependencies
2928
run: |
3029
python -m pip install --upgrade pip
31-
pip install tox==4.30.2
30+
pip install tox
3231
- name: Generate docs
3332
run: |
3433
tox -c py/tox.ini
3534
env:
3635
TOXENV: docs
3736

38-
mypy:
39-
name: Mypy
40-
needs: build
37+
typing:
38+
name: Type Checker
4139
runs-on: ubuntu-latest
4240
steps:
4341
- name: Checkout source tree
4442
uses: actions/checkout@v4
45-
- name: Set up Python 3.9
43+
- name: Set up Python 3.10
4644
uses: actions/setup-python@v6
4745
with:
48-
python-version: 3.9
46+
python-version: '3.10'
4947
- name: Install dependencies
5048
run: |
5149
python -m pip install --upgrade pip
52-
pip install tox==4.30.2
50+
pip install tox
5351
- name: Run type checking
5452
run: |
5553
tox -c py/tox.ini || true
@@ -64,12 +62,19 @@ jobs:
6462
fail-fast: false
6563
matrix:
6664
include:
67-
- os: ubuntu
68-
- os: macos
65+
- python-version: '3.10'
66+
os: ubuntu
67+
- python-version: '3.10'
68+
os: macos
69+
- python-version: '3.14'
70+
os: ubuntu
71+
- python-version: '3.14'
72+
os: macos
6973
with:
70-
name: Unit Tests (${{ matrix.os }})
74+
name: Unit Tests (${{ matrix.python-version }}, ${{ matrix.os }})
7175
os: ${{ matrix.os }}
72-
cache-key: python-unit-test-${{ matrix.os }}
76+
python-version: ${{ matrix.python-version }}
77+
cache-key: python-unit-test-${{ matrix.python-version }}
7378
run: |
7479
bazel test //py:unit
7580

.github/workflows/update-documentation.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ jobs:
6666
with:
6767
java-version: 17
6868
distribution: 'temurin'
69-
- name: Set up Python 3.9
69+
- name: Set up Python 3.10
7070
if: ${{ inputs.language == 'py' || inputs.language == 'all' }}
7171
uses: actions/setup-python@v6
7272
with:
73-
python-version: 3.9
73+
python-version: '3.10'
7474
- name: Install dependencies
7575
if: ${{ inputs.language == 'py' || inputs.language == 'all' }}
7676
run: |

MODULE.bazel

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ bazel_dep(name = "rules_multitool", version = "1.3.0")
2424
bazel_dep(name = "rules_nodejs", version = "6.3.2")
2525
bazel_dep(name = "rules_oci", version = "1.8.0")
2626
bazel_dep(name = "rules_pkg", version = "1.0.1")
27-
bazel_dep(name = "rules_python", version = "1.5.0")
27+
bazel_dep(name = "rules_python", version = "1.6.3")
2828
bazel_dep(name = "rules_proto", version = "7.0.2")
2929
bazel_dep(name = "rules_ruby", version = "0.19.0")
3030

@@ -123,12 +123,12 @@ use_repo(oci, "chrome_standalone", "firefox_standalone", "java_image_base")
123123
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
124124
python.toolchain(
125125
is_default = True,
126-
python_version = "3.9",
126+
python_version = "3.10",
127127
)
128-
python.toolchain(python_version = "3.10")
129128
python.toolchain(python_version = "3.11")
130129
python.toolchain(python_version = "3.12")
131130
python.toolchain(python_version = "3.13")
131+
python.toolchain(python_version = "3.14")
132132
use_repo(python, "pythons_hub")
133133

134134
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
@@ -140,11 +140,11 @@ pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
140140
requirements_lock = "//py:requirements_lock.txt",
141141
)
142142
for version in [
143-
"3.9",
144143
"3.10",
145144
"3.11",
146145
"3.12",
147146
"3.13",
147+
"3.14",
148148
]
149149
]
150150

multitool.lock.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@
44
"binaries": [
55
{
66
"kind": "archive",
7-
"url": "https://github.com/astral-sh/ruff/releases/download/0.13.0/ruff-aarch64-unknown-linux-musl.tar.gz",
7+
"url": "https://github.com/astral-sh/ruff/releases/download/0.14.0/ruff-aarch64-unknown-linux-musl.tar.gz",
88
"file": "ruff-aarch64-unknown-linux-musl/ruff",
9-
"sha256": "bdee6f1376470b74b1dc5ed48eca52ec9c3e4512bd7f3204e0df100f0bed4741",
9+
"sha256": "34a25398f03e7d32a4ec406c5c841c6e183fa0a96fbdd40b7e7eec1f177b360e",
1010
"os": "linux",
1111
"cpu": "arm64"
1212
},
1313
{
1414
"kind": "archive",
15-
"url": "https://github.com/astral-sh/ruff/releases/download/0.13.0/ruff-x86_64-unknown-linux-musl.tar.gz",
15+
"url": "https://github.com/astral-sh/ruff/releases/download/0.14.0/ruff-x86_64-unknown-linux-musl.tar.gz",
1616
"file": "ruff-x86_64-unknown-linux-musl/ruff",
17-
"sha256": "b56ac90cc6987401bafdcf1b931ef044074c5b9451286afa4606a983f64f4fdd",
17+
"sha256": "ed6d1b8407a1d228dc332fb19057e86e04a6cd3c2beacdb324ad6ff2a3f9071b",
1818
"os": "linux",
1919
"cpu": "x86_64"
2020
},
2121
{
2222
"kind": "archive",
23-
"url": "https://github.com/astral-sh/ruff/releases/download/0.13.0/ruff-aarch64-apple-darwin.tar.gz",
23+
"url": "https://github.com/astral-sh/ruff/releases/download/0.14.0/ruff-aarch64-apple-darwin.tar.gz",
2424
"file": "ruff-aarch64-apple-darwin/ruff",
25-
"sha256": "0d706798534537b6655b79fd95c2955c0a0013d4c54d36679d3306825a6bd6aa",
25+
"sha256": "0b7c193d5c45eda02226720eb75239fabeca995d5a0eb3830fd2973caa3030ec",
2626
"os": "macos",
2727
"cpu": "arm64"
2828
},
2929
{
3030
"kind": "archive",
31-
"url": "https://github.com/astral-sh/ruff/releases/download/0.13.0/ruff-x86_64-apple-darwin.tar.gz",
31+
"url": "https://github.com/astral-sh/ruff/releases/download/0.14.0/ruff-x86_64-apple-darwin.tar.gz",
3232
"file": "ruff-x86_64-apple-darwin/ruff",
33-
"sha256": "ac47ad1ac90f3070c064d2f5fceef4fe609fec7c073fd29d0814ed126c492e6d",
33+
"sha256": "880ae046b435eb306cd557a7481eed6da463b85f283ba1f2c1e2ad7c139ed6c5",
3434
"os": "macos",
3535
"cpu": "x86_64"
3636
},
3737
{
3838
"kind": "archive",
39-
"url": "https://github.com/astral-sh/ruff/releases/download/0.13.0/ruff-x86_64-pc-windows-msvc.zip",
39+
"url": "https://github.com/astral-sh/ruff/releases/download/0.14.0/ruff-x86_64-pc-windows-msvc.zip",
4040
"file": "ruff-x86_64-pc-windows-msvc/ruff.exe",
41-
"sha256": "3a8d8cb96333671f78a5d209ddb4f830287e3eb2796fe01dd043b02ec1c1c7f1",
41+
"sha256": "f81f957c862f310ac0be70ae7cef2e99afb4cc09648e40c039432e11465c2c1c",
4242
"os": "windows",
4343
"cpu": "x86_64"
4444
}

py/BUILD.bazel

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -314,24 +314,24 @@ py_wheel(
314314
"Topic :: Software Development :: Testing",
315315
"Topic :: Software Development :: Libraries",
316316
"Programming Language :: Python",
317-
"Programming Language :: Python :: 3.9",
318317
"Programming Language :: Python :: 3.10",
319318
"Programming Language :: Python :: 3.11",
320319
"Programming Language :: Python :: 3.12",
321320
"Programming Language :: Python :: 3.13",
321+
"Programming Language :: Python :: 3.14",
322322
],
323323
description_file = "README.rst",
324324
distribution = "selenium",
325325
homepage = "https://www.selenium.dev",
326326
license = "Apache-2.0",
327-
python_requires = ">=3.9",
327+
python_requires = ">=3.10",
328328
python_tag = "py3",
329329
requires = [
330330
"urllib3[socks]>=2.5.0,<3.0",
331-
"trio>=0.30.0,<1.0",
331+
"trio>=0.31.0,<1.0",
332332
"trio-websocket>=0.12.2,<1.0",
333-
"certifi>=2025.6.15",
334-
"typing_extensions>=4.14.0,<5.0",
333+
"certifi>=2025.10.5",
334+
"typing_extensions>=4.15.0,<5.0",
335335
"websocket-client>=1.8.0,<2.0",
336336
],
337337
strip_path_prefixes = [

py/docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
Jinja2==3.1.6
2-
Sphinx==7.4.7
2+
Sphinx==8.1.3
33
sphinx-material==0.0.36

py/docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Updated documentation published with each commit is available at: `readthedocs.i
3030
Supported Python Versions
3131
=========================
3232

33-
* Python 3.9+
33+
* Python 3.10+
3434

3535
Supported Browsers
3636
==================

py/pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ license = "Apache-2.0"
99
license-files = ["LICENSE", "NOTICE"]
1010
description = "Official Python bindings for Selenium WebDriver."
1111
readme = "README.rst"
12-
requires-python = "~=3.9"
12+
requires-python = ">=3.10"
1313
classifiers = [
1414
"Development Status :: 5 - Production/Stable",
1515
"Intended Audience :: Developers",
@@ -19,18 +19,18 @@ classifiers = [
1919
"Topic :: Software Development :: Testing",
2020
"Topic :: Software Development :: Libraries",
2121
"Programming Language :: Python",
22-
"Programming Language :: Python :: 3.9",
2322
"Programming Language :: Python :: 3.10",
2423
"Programming Language :: Python :: 3.11",
2524
"Programming Language :: Python :: 3.12",
2625
"Programming Language :: Python :: 3.13",
26+
"Programming Language :: Python :: 3.14",
2727
]
2828
dependencies = [
2929
"urllib3[socks]>=2.5.0,<3.0",
30-
"trio>=0.30.0,<1.0",
30+
"trio>=0.31.0,<1.0",
3131
"trio-websocket>=0.12.2,<1.0",
32-
"certifi>=2025.6.15",
33-
"typing_extensions>=4.14.0,<5.0",
32+
"certifi>=2025.10.5",
33+
"typing_extensions>=4.15.0,<5.0",
3434
"websocket-client>=1.8.0,<2.0",
3535
]
3636

py/requirements.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
attrs==25.3.0
22
cachetools==6.2.0
3-
certifi==2025.8.3
3+
certifi==2025.10.5
44
cffi==2.0.0
55
chardet==5.2.0
66
charset-normalizer==3.4.3
77
colorama==0.4.6
8-
cryptography==45.0.7
9-
debugpy==1.8.16
8+
cryptography==46.0.2
9+
debugpy==1.8.17
1010
distlib==0.4.0
1111
docutils==0.21.2
1212
filelock==3.19.1
@@ -22,7 +22,7 @@ jaraco.context==6.0.1
2222
jaraco.functools==4.3.0
2323
jeepney==0.9.0
2424
keyring==25.6.0
25-
markdown-it-py==3.0.0
25+
markdown-it-py==4.0.0
2626
mdurl==0.1.2
2727
more-itertools==10.8.0
2828
multidict==6.6.4
@@ -38,18 +38,18 @@ pyproject-api==1.9.1
3838
PySocks==1.7.1
3939
pytest==8.4.2
4040
pytest-instafail==0.5.0
41-
pytest-mock==3.15.0
41+
pytest-mock==3.15.1
4242
pytest-trio==0.8.0
4343
pywin32-ctypes==0.2.3
4444
readme_renderer==44.0
4545
requests==2.32.5
4646
requests-toolbelt==1.0.0
4747
rfc3986==2.0.0
4848
rich==14.1.0
49-
SecretStorage==3.3.3
49+
SecretStorage==3.4.0
5050
sniffio==1.3.1
5151
sortedcontainers==2.4.0
52-
tox==4.30.2
52+
tox==4.30.3
5353
trio==0.31.0
5454
trio-websocket==0.12.2
5555
twine==6.2.0

0 commit comments

Comments
 (0)