question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Upper version limits in dependencies

See original GitHub issue

requests currently has a bunch of version restrictions:

  • chardet>=3.0.2,<5
  • idna>=2.5,<3
  • urllib3>=1.21.1,<1.27

In particular with idna and urllib3, which are widely used themself, whenever another package triggers installation of an open-ended version of these libraries, a subsequent install of requests then will lead to warnings or errors the like

requests 2.25.1 requires idna<3,>=2.5, but you'll have idna 3.1 which is incompatible.

Are there actual reasons to limit the upper versions? Could these be lifted?

Putting version upper limits into widely used libraries leads to major headaches for downstream project. Even when following a dedicated-venv-per-app model, if that app has multiple dependencies that in turn depend on above, this is tricky to fix (order dependency, finding an intersecting version in the first place, …). fwiw, I’ve spent countless hours on fixing fallout from such scenarios …

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
walchkocommented, Feb 28, 2021

Thanks for your all of your hard work and I really enjoy requests. But continuing to support Python 2 prolongs this problem of everyone transitioning off of it. The world has had more than enough time to migrate, wasting time being compatible with an unsupported language is a waste of your limited time.

1reaction
karolyicommented, Apr 15, 2021

For the time being, until #5711 will get merged, the solution is to use the pull request’s code state:

That is, putting the following line into the requirements.txt: git+https://github.com/psf/requests.git@refs/pull/5711/head

Read more comments on GitHub >

github_iconTop Results From Across the Web

Should You Use Upper Bound Version Constraints?
In this discussion I would like to explain why always providing an upper limit causes far more harm than good even for true...
Read more >
Versions of dependencies - Yarn
Version ranges ; <2.0.0, Any version that is less than 2.0.0. <=3.1.4, Any version that is less than or equal to 3.1.4. >0.4.2,...
Read more >
Declaring Versions and Ranges - Gradle User Manual
Gradle supports different ways of declaring a version string: ... When the upper or lower bound is missing, the range has no upper...
Read more >
Maven Version range: how to set upper limit if breaking ...
When setting the version of the shared dependency in the adapters, I want to use Maven version ranges, so Maven knows that using...
Read more >
7 Understanding Maven Version Numbers - Oracle Help Center
In a Maven environment, it is very important to understand the use of version numbers. A well thought out strategy can greatly simplify...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found