Skip to content

Conversation

@epenet
Copy link
Contributor

@epenet epenet commented May 23, 2025

Proposed change

urllib3 v2 was released in early 2023

While urllib3 1.26.x is still supported, it won’t get new features or bug fixes, just security updates. Consider opening a tracking issue to unpin urllib3 in the future to not stay on 1.26.x indefinitely.

https://urllib3.readthedocs.io/en/stable/v2-migration-guide.html

Needs:

Original issue #97248 was linked to botocore which has since been made compatible with urllib3 v2

See in particular boto/botocore@785d224 (enable <2.1) and boto/botocore#3141 (enable <3)

File "/usr/local/lib/python3.11/site-packages/botocore/utils.py", line 32, in
import botocore.httpsession
File "/usr/local/lib/python3.11/site-packages/botocore/httpsession.py", line 10, in
from urllib3.util.ssl import (
ImportError: cannot import name 'DEFAULT_CIPHERS' from 'urllib3.util.ssl' (/usr/local/lib/python3.11/site-packages/urllib3/util/ssl.py)

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Deprecation (breaking change to happen in the future)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:
  • Link to developer documentation pull request:
  • Link to frontend pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • I have followed the perfect PR recommendations
  • The code has been formatted using Ruff (ruff format homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • For the updated dependencies - a link to the changelog, or at minimum a diff between library versions is added to the PR description.

To help with the load of incoming pull requests:

@epenet epenet requested a review from a team as a code owner May 23, 2025 06:23
@epenet epenet changed the title Add support for urllib3 > 2 Add support for urllib3 >= 2 May 23, 2025
@epenet epenet changed the title Add support for urllib3 >= 2 Relax constraint on urllib3 May 23, 2025
@epenet epenet marked this pull request as draft May 23, 2025 06:53
typing-extensions>=4.14.0,<5.0
ulid-transform==1.4.0
urllib3>=1.26.5,<2
urllib3>=1.26.5
Copy link
Member

Choose a reason for hiding this comment

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

Should we update the constraint to >=2.0 or even something newer like 2.2 or 2.4? That way we could prevent accidentally installing an old version again.

Note that it might cause issues with custom components but maybe the best way to deal with those would be to see what breaks after the release and fix the dependencies then accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think maybe >=2.0 is a good first step - so users have time to spot the deprecation warnings and adjust accordingly.

@epenet epenet force-pushed the epenet-20250523-0816 branch from d903299 to 20fc69b Compare June 11, 2025 10:20
@epenet epenet marked this pull request as ready for review June 11, 2025 10:23
@epenet epenet changed the title Relax constraint on urllib3 Adjust urllib3 constraint to >=2.0 Jun 11, 2025
@epenet epenet changed the title Adjust urllib3 constraint to >=2.0 Adjust urllib3 constraint Jun 11, 2025
Copy link
Member

@cdce8p cdce8p left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thanks @epenet for your work getting this to the finish line 🚀

@epenet epenet merged commit acf31f6 into dev Jun 11, 2025
48 checks passed
@epenet epenet deleted the epenet-20250523-0816 branch June 11, 2025 13:12
@github-actions github-actions bot locked and limited conversation to collaborators Jun 12, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants