Skip to content

Conversation

cgoldberg
Copy link
Member

@cgoldberg cgoldberg commented Sep 21, 2025

User description

💥 What does this PR do?

  • Adds support for Python 3.14 (released: 10/7/2025): https://docs.python.org/3/whatsnew/3.14.html

  • Drops support for Python 3.9. This version is officially EOL as of 10/31/2025. Some of our dependencies have already dropped support for 3.9 and it is becoming problematic to continue supporting it.

  • Changes the default version of Python we use in CI workflow jobs to 3.10

  • Updates all Python dependencies for testing and packaging.

  • Updates Bazel and workflow configurations to enable running unit tests on the oldest/newest versions on Python we support.

  • Removes build requirement from CI jobs that don't require it

🔄 Types of changes

  • Build/Packaging/Testing

PR Type

Enhancement


Description

  • Add Python 3.14 support and drop Python 3.9

  • Update CI default Python version to 3.10

  • Upgrade dependencies and build tools

  • Update documentation and installation instructions


Diagram Walkthrough

flowchart LR
  A["Python 3.9"] -- "drop support" --> B["Python 3.10-3.14"]
  B -- "update" --> C["CI workflows"]
  B -- "upgrade" --> D["dependencies"]
  C --> E["documentation"]
  D --> E
Loading

File Walkthrough

Relevant files
Configuration changes
5 files
ci-python.yml
Update CI Python version to 3.10                                                 
+6/-6     
update-documentation.yml
Update documentation workflow Python version                         
+2/-2     
MODULE.bazel
Update Python toolchain and dependencies                                 
+4/-4     
BUILD.bazel
Update Python classifiers and requirements                             
+5/-5     
pyproject.toml
Update Python requirements and dependencies                           
+5/-5     
Dependencies
5 files
multitool.lock.json
Update ruff version to 0.13.3                                                       
+10/-10 
requirements.txt
Upgrade Sphinx to 8.1.3                                                                   
+1/-1     
requirements.txt
Update development dependencies                                                   
+7/-7     
requirements_lock.txt
Regenerate locked requirements for Python 3.10                     
+106/-85
tox.ini
Update mypy and ruff versions                                                       
+2/-2     
Documentation
1 files
index.rst
Update supported Python version documentation                       
+3/-3     

@cgoldberg cgoldberg marked this pull request as draft September 21, 2025 21:20
@selenium-ci selenium-ci added C-py Python Bindings B-build Includes scripting, bazel and CI integrations labels Sep 21, 2025
Copy link
Contributor

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Build Matrix Consistency

Ensure CI/build configurations (Bazel toolchains, pip parse hub, and any test matrix) consistently include Python 3.14 and that the referenced rules_python version actually supports 3.14 to avoid resolution or toolchain selection failures.

python.toolchain(python_version = "3.14")
use_repo(python, "pythons_hub")

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")

[
    pip.parse(
        hub_name = "py_dev_requirements",
        python_version = version,
        requirements_lock = "//py:requirements_lock.txt",
    )
    for version in [
        "3.9",
        "3.10",
        "3.11",
        "3.12",
        "3.13",
        "3.14",
    ]
]
Version Constraint Change

Relaxing requires-python to ">=3.9" broadens supported versions; verify this aligns with policy and that packaging/CI wheels and metadata remain correct for all versions, including future 3.x, to avoid unintended installs.

requires-python = ">=3.9"
classifiers = [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "Operating System :: POSIX",
    "Operating System :: Microsoft :: Windows",
    "Operating System :: MacOS :: MacOS X",
    "Topic :: Software Development :: Testing",
    "Topic :: Software Development :: Libraries",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Programming Language :: Python :: 3.14",
    ]

Copy link
Contributor

qodo-merge-pro bot commented Sep 21, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Restrict Python version to avoid issues

Add an upper bound to the requires-python specifier to prevent future
compatibility issues, changing it from ">=3.9" to ">=3.9, <4.0".

py/pyproject.toml [12]

-requires-python = ">=3.9"
+requires-python = ">=3.9, <4.0"
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly identifies that requires-python = ">=3.9" is too permissive and could cause future installation issues with Python 4.0, proposing a safer upper bound which is a packaging best practice.

Low
  • Update

@cgoldberg cgoldberg changed the title [py] Support Python 3.14 [py] Support Python 3.14 and drop Python 3.9 Oct 5, 2025
@cgoldberg
Copy link
Member Author

@shbenzer @navin772 Do you see any issues with dropping support for Python 3.9?

@navin772
Copy link
Member

navin772 commented Oct 5, 2025

No issues if the CI passes with 3.10, which it does, there seems to be a minor issue with docs and mypy CI, it is looking for python 3.1 instead of 3.10.

@shbenzer
Copy link
Contributor

shbenzer commented Oct 5, 2025

I agree w/ @navin772, as long as we can fully support the next up I'd like to keep us from supporting anything not supported by the Python project. To answer your question directly though, I am not aware of any issues w/ dropping 3.9 specifically.

@cgoldberg
Copy link
Member Author

it is looking for python 3.1 instead of 3.10.

Fixed.

I'll merge this in a few days after 3.14 is officially released.

@cgoldberg cgoldberg self-assigned this Oct 8, 2025
@cgoldberg cgoldberg marked this pull request as ready for review October 9, 2025 13:42
@cgoldberg cgoldberg requested review from navin772 and shbenzer October 9, 2025 13:43
@SeleniumHQ SeleniumHQ deleted a comment from qodo-merge-pro bot Oct 9, 2025
@SeleniumHQ SeleniumHQ deleted a comment from qodo-merge-pro bot Oct 9, 2025
@cgoldberg cgoldberg requested a review from navin772 October 10, 2025 11:59
Copy link
Member

@navin772 navin772 left a comment

Choose a reason for hiding this comment

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

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-build Includes scripting, bazel and CI integrations C-py Python Bindings Review effort 2/5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants