Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Pin urllib3 to <2 to avoid incompatibility issues with botocore #1680

Merged
merged 2 commits into from
May 8, 2023

Conversation

edgarrmondragon
Copy link
Collaborator

@edgarrmondragon edgarrmondragon commented May 8, 2023

@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Merging #1680 (61b0437) into main (a644272) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #1680   +/-   ##
=======================================
  Coverage   85.07%   85.07%           
=======================================
  Files          59       59           
  Lines        4864     4864           
  Branches      807      807           
=======================================
  Hits         4138     4138           
  Misses        527      527           
  Partials      199      199           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

pyproject.toml Outdated Show resolved Hide resolved
@edgarrmondragon edgarrmondragon changed the title fix: Constraint requests to <2.30 to avoid compatibility issues with botocore fix: Constrain urllib3 to <2 to avoid compatibility issues with botocore May 8, 2023
@edgarrmondragon edgarrmondragon changed the title fix: Constrain urllib3 to <2 to avoid compatibility issues with botocore fix: Constrain urllib3 to <2 to avoid incompatibility issues with botocore May 8, 2023
Copy link
Member

@WillDaSilva WillDaSilva left a comment

Choose a reason for hiding this comment

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

@edgarrmondragon How soon do you think this restriction could be removed? As time goes on more and more libraries will have dependencies on urllib3 >= 2.

@edgarrmondragon
Copy link
Collaborator Author

edgarrmondragon commented May 8, 2023

@WillDaSilva Hopefully as soon as botocore loosens its constraint on urllib3: https://github.com/boto/botocore/blob/f49c300cbc363a83821abac236ac57b4d43d1e7c/setup.py#L28

boto/botocore#2926

@edgarrmondragon edgarrmondragon changed the title fix: Constrain urllib3 to <2 to avoid incompatibility issues with botocore fix: Pin urllib3 to <2 to avoid incompatibility issues with botocore May 8, 2023
@edgarrmondragon edgarrmondragon merged commit 3876994 into main May 8, 2023
@edgarrmondragon edgarrmondragon deleted the fix/urllib3 branch May 8, 2023 19:18
@prevostc
Copy link

@edgarrmondragon
Copy link
Collaborator Author

@WillDaSilva Hopefully as soon as botocore loosens its constraint on urllib3: https://github.com/boto/botocore/blob/f49c300cbc363a83821abac236ac57b4d43d1e7c/setup.py#L28
boto/botocore#2926

I believe that should be fixed now https://github.com/boto/botocore/blob/1.34.20/setup.py#L29

Thanks for the reference @prevostc!

Unfortunately, we use poetry export and it doesn't seem to like either of these dependency declarations:

  1. urllib3 = ">=1.26"

    The `urllib3` package has the following compatible candidates `[Package('urllib3', '1.26.18')]`;  but, the exporter dependency walker previously elected `urllib3 (2.0.7)` which is not compatible with the dependency `urllib3 (>=1.25.4,<1.27)`. Please contribute to `poetry-plugin-export` to solve this problem.
    

    Export fails due to urllib3 version mismatch python-poetry/poetry-plugin-export#239

  2. urllib3 = [
        {version = ">=1.26,<1.27", markers = "python_version < \"3.10\""},
        {version = ">=1.26,<2.1", markers = "python_version >= \"3.10\""},
    ]
    Dependency walk failed at urllib3 (>=1.21.1,<3)
    

    Dependency walk failed python-poetry/poetry-plugin-export#176

So, sadly this means we have to

  • wait for poetry-plugin-export to fix this
  • or move away from poetry-plugin-export for testing/CI
  • or move away from poetry entirely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants