Wrong sub-dependency version selected
See original GitHub issue- OS version and name: macOS, py3.8, py3.9
- Poetry version: 1.0.5
Reproduce
poetry init
poetry add beautifulsoup4
Installs sub-dep soupsieve==1.9.8
even though soupsieve==2.0.1
is available:
> poetry run pip freeze
beautifulsoup4==4.9.1
soupsieve==1.9.6
beautifulsoup4
has these lines in setup.py
:
install_requires=["soupsieve>1.2"]
if sys.version_info.major == 2:
install_requires.append("soupsieve<2.0")
ref: https://bazaar.launchpad.net/~leonardr/beautifulsoup/bs4/view/head:/setup.py#L11
poetry somehow picks up this restriction:
> poetry show --tree
beautifulsoup4 4.9.1 Screen-scraping library
├── soupsieve >1.2
└── soupsieve <2.0
and also shows the sub-dep as outdated:
> poetry show --outdated
soupsieve 1.9.6 2.0.1 A modern CSS selector implementation for Beautiful Soup.
This is all I know for now… I’ll look into the wheels, etc.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:6 (5 by maintainers)
Top Results From Across the Web
maven dependency pulling a wrong dependency
If you find a crash between different versions of the same dependency, the first thing you should do is figure out whether the...
Read more >Overriding Dependency Versions and Using Version Ranges ...
Sometimes, Maven's automatic version selection picks the wrong version. For example, you might want to force your program to use an updated ......
Read more >How to Resolve a Version Collision of Artifacts in Maven
One way to resolve a version collision is by removing a conflicting transitive dependency from specific artifacts. In our example, we don't want...
Read more >Downgrading versions and excluding dependencies
Overriding transitive dependency versions. Gradle resolves any dependency version conflicts by selecting the latest version found in the dependency graph.
Read more >Overriding Dependency Versions with Spring Boot
(i.e. it has the wrong version of Reactor). This is because the parent has dependency management for Reactor, and there is no explicit...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The tarball is a bit suspect, egg info has both restrictions, but setup.py has a conditional restriction.
If poetry evaluates tarball egg info, how should
beautifulsoup4
author write their library so that poetry picks up correct sub-dependency versions for Python3 and Python2?beautifulsoup4
project has since removed the Python major conditional entirely. I guess the original issue is now “gone”.