Closed fj-dt closed 2 years ago
At 4.9.1, beautifulsoup expressed their soupsieve requirement by executing conditional code in setup.py:
install_requires=["soupsieve>1.2"]
if sys.version_info.major == 2:
install_requires.append("soupsieve<2.0")
this is hard for poetry to handle, it looks as though it has 'seen' both branches but is not able to realise that one of them is only meant for python 2.
in later releases they moved to markers:
install_requires=[
"soupsieve >1.2; python_version>='3.0'",
"soupsieve >1.2, <2.0; python_version<'3.0'",
],
which is much better, and I expect poetry would handle just fine
At this point beautifulsoup has dropped support for python2 altogether and none of this is relevant, I expect it's safe to close this out.
Yes, this is no longer relevant. Also, a lot has changed since poetry 1.1.5. You can check it with the newest version and if that's still a problem, open a new issue.
For what it's worth I expect this would still be a problem with beautifulsoup 4.9.1: it still is hard for poetry
to understand setup.py with conditional code.
Encouraging the ecosystem to move to markers - as beautifulsoup already did - is the best way to make this sort of thing more reliable.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
-vvv
option).Issue
I am using Python3 and I want to install
beautifulsoup4==4.9.1
.beautifulsoup4==4.9.1
has a dependency calledsoupsieve
.soupsieve
has a constraints specifically for Python 2.x version which sayssoupsieve<2.0
.When I lock
beautifulsoup4==4.9.1
, I see that Poetry does not find the correct constraints for Python 3.7. It should installsoupsieve
version2.x
but it installssoupsieve
version1.x
.I double-checked that my venv is using Python 3.x and that Poetry also uses Python 3.x. I also tried with pip, pip-tools and pipenv; they are all locking the right version.
Here's the lock file
Thanks for your help!