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

Poetry unable to resolve urllib3 dependency while pip is able to #3404

Closed
1 task
MeSmileyFace opened this issue Feb 24, 2025 · 3 comments
Closed
1 task

Poetry unable to resolve urllib3 dependency while pip is able to #3404

MeSmileyFace opened this issue Feb 24, 2025 · 3 comments
Labels
response-requested Waiting on additional info and feedback. third-party

Comments

@MeSmileyFace
Copy link

Describe the bug

I'm getting dependency conflict when trying to lock dependencies with poetry. It states that botocore 1.35.87 depends on urllib3(>=1.25.4, <1.27) therefore its unable to resolve it due to one of my custom packages requiring urllib3(2.3.0).

Image
In the screenshot above, we can see that there are two urllib3 constraints where the first one(underlined with red) seems to contradict the second one(underlined with yellow)?

It may be important to note that it resolves the dependencies successfully when installing the requirements with pip install -r requirements.txt but the problem lies when using poetry lock.

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

To have the dependencies resolved

Current Behavior

Because botocore (1.35.87) depends on urllib3 (>=1.25.4,<1.27)
and my-package depends on urllib3 (2.3.0), botocore is forbidden.
So, because my-package depends on botocore (1.35.87), version solving failed.

Reproduction Steps

Have a package requiring urllib3 version 2.3.0 and botocore 1.35.87 and try poetry lock

Possible Solution

Perhaps remove the constraint limiting urllib3 to <1.27?

Additional Information/Context

No response

SDK version used

Python 3.10.15

Environment details (OS name and version, etc.)

Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye

@MeSmileyFace MeSmileyFace added bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Feb 24, 2025
@nateprewitt
Copy link
Contributor

Hi @MeSmileyFace, you may need to ensure that you're locking with the same (or lowest) Python version you're intending to deploy with.

The constraints you highlight state in plain terms:

  • The red line declares we only support urllib3 1.x being installed on Python 3.9 and earlier.
  • The yellow line declares we support urllib3 2.x, except 2.2.0, for Python 3.10 and later.

If you're trying to force use of urllib3 2.x before Python 3.10, we don't support that. We cannot safely add support for all systems prior to changes made in Python 3.10 with PEP 644.

If you are using 3.10 and it's not resolving, that sounds like a potential issue with Poetry. You may consider reaching out to their issue tracker if you're seeing it cannot resolve markers correctly. Those have been supported by pip since ~2015.

@nateprewitt nateprewitt added response-requested Waiting on additional info and feedback. third-party and removed bug This issue is a confirmed bug. needs-triage This issue or PR still needs to be triaged. labels Feb 24, 2025
@MeSmileyFace
Copy link
Author

Hi @nateprewitt in my desperation with the dependency conflict and exhaustion of many other solutions I have completely overlooked the fact that one shows >= 3.10 and the other < 3.10. Seems like i had simply chosen to believe that this was the issue since it seemed like the easiest fix, I'm sorry to have wasted your time and thank you for the swift response.

Copy link

This issue is now closed. Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
response-requested Waiting on additional info and feedback. third-party
Projects
None yet
Development

No branches or pull requests

2 participants