Skip to content

Conversation

@cgoldberg
Copy link
Member

@cgoldberg cgoldberg commented Jun 18, 2025

User description

💥 What does this PR do?

This PR updates all Python dependencies to the latest versions for development and packaging.

This also includes an update to a unit test to reflect new behavior of retries in urllib3, and some minor test cleanup.

🔄 Types of changes

  • Dev/CI/Packaging

PR Type

Other


Description

• Update Python dependencies to latest versions
• Bump tox from 4.25.0 to 4.27.0 in CI workflows
• Update urllib3 from 2.4.0 to 2.5.0 in pyproject.toml
• Refresh requirements.txt and lock file with latest versions


Changes walkthrough 📝

Relevant files
Dependencies
ci-python.yml
Bump tox version in CI workflows                                                 

.github/workflows/ci-python.yml

• Update tox version from 4.25.0 to 4.27.0 in both docs and type
checking jobs

+2/-2     
pyproject.toml
Update core dependencies versions                                               

py/pyproject.toml

• Update urllib3[socks] from ~=2.4.0 to ~=2.5.0
• Update certifi from
>=2025.4.26 to >=2025.6.15

+2/-2     
requirements.txt
Update development dependencies                                                   

py/requirements.txt

• Remove async-generator, pyOpenSSL, pyparsing, toml packages
• Update
multiple packages: cachetools, certifi, cryptography, multidict,
pytest, requests, tox, urllib3, zipp
• Add pywin32-ctypes package

+10/-13 
requirements_lock.txt
Update locked dependency hashes                                                   

py/requirements_lock.txt

• Remove locked versions for async-generator, pyOpenSSL, pyparsing,
toml
• Update hash checksums for all updated packages
• Add
pywin32-ctypes with locked version and hashes

+176/-184

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @qodo-merge-pro
    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

    Package Removal

    Several packages were removed from requirements including async-generator, pyOpenSSL, pyparsing, and toml. Need to verify these packages are not required by the application or its dependencies to avoid runtime errors.

    attrs==25.3.0
    cachetools==6.1.0
    certifi==2025.6.15
    cffi==1.17.1
    chardet==5.2.0
    charset-normalizer==3.4.2
    colorama==0.4.6
    cryptography==45.0.4
    debugpy==1.8.14
    distlib==0.3.9
    docutils==0.21.2
    filelock==3.18.0
    filetype==1.2.0
    h11==0.16.0
    id==1.5.0
    idna==3.10
    importlib_metadata==8.7.0
    inflection==0.5.1
    iniconfig==2.1.0
    jaraco.classes==3.4.0
    jaraco.context==6.0.1
    jaraco.functools==4.1.0
    jeepney==0.9.0
    keyring==25.6.0
    markdown-it-py==3.0.0
    mdurl==0.1.2
    more-itertools==10.7.0
    multidict==6.5.0
    nh3==0.2.21
    outcome==1.3.0.post0
    packaging==25.0
    platformdirs==4.3.8
    pluggy==1.6.0
    py==1.11.0
    pycparser==2.22
    Pygments==2.19.1
    pyproject-api==1.9.1
    PySocks==1.7.1
    pytest==8.4.1
    pytest-instafail==0.5.0
    pytest-mock==3.14.1
    pytest-trio==0.8.0
    pywin32-ctypes==0.2.3
    readme_renderer==44.0
    requests==2.32.4
    requests-toolbelt==1.0.0
    rfc3986==2.0.0
    rich==14.0.0
    SecretStorage==3.3.3
    sniffio==1.3.1
    sortedcontainers==2.4.0
    tox==4.27.0
    trio==0.30.0
    trio-websocket==0.12.2
    twine==6.1.0
    typing_extensions==4.14.0
    urllib3[socks]==2.5.0
    virtualenv==20.31.2
    websocket-client==1.8.0
    wsproto==1.2.0
    zipp==3.23.0
    

    @qodo-merge-pro
    Copy link
    Contributor

    qodo-merge-pro bot commented Jun 18, 2025

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @selenium-ci selenium-ci added C-py Python Bindings B-build Includes scripting, bazel and CI integrations labels Jun 18, 2025
    @cgoldberg
    Copy link
    Member Author

    The upgrade of urllib3 from 2.4.0->2.5.0 breaks the unit test:

    py/test/unit/selenium/webdriver/remote/remote_connection_tests.py::test_get_connection_manager_with_custom_args

    This test sets an integer for the retry when creating a urllib3.PoolManager: {"retries": 3, "block": True}}

    It fails with:

    >       assert conn.connection_pool_kw["retries"] == 3
    E       assert Retry(total=3, connect=None, read=None, redirect=0, status=None) == 3
    

    in 2.4.0 the value of retries was an integer.

    in 2.5.0 the value of retries is an instance of urllib3.util.Retry

    I have no idea what the repercussions of this are, but this needs investigation before merging.

    @cgoldberg
    Copy link
    Member Author

    The 2 CI failures are in Java tests and unrelated to this PR

    @cgoldberg
    Copy link
    Member Author

    Fixed the unit tests to address #15909 (comment)

    @cgoldberg cgoldberg merged commit 367c8c1 into SeleniumHQ:trunk Jun 19, 2025
    15 of 16 checks passed
    @cgoldberg cgoldberg deleted the py-bump-requirements branch June 19, 2025 19:44
    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.

    2 participants