Conditional soupsieve dependency constraint should be specified per PEP 508
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Beautiful Soup |
Fix Released
|
Undecided
|
Mike Nerone |
Bug Description
BS4's setup.py currently contains:
install_
if sys.version_
install_
As you can see in this response, PyPI advertises only one set of requirements for a release:
# Note no whl file or Py-version specificity in the URL or JSON paths
curl https:/
[
"soupsieve (>1.2)",
"soupsieve (<2.0)",
"html5lib; extra == 'html5lib'",
"lxml; extra == 'lxml'"
]
This impacts resolution of the dependency tree for modern dep management tools (like Poetry) that use PyPI metadata, erroneously causing them to select soupsieve<2.0 even for Python 3. It's impossible to determine actual requirements short of downloading all of the individual whl files (or worse, downloading the sdist and executing setup.py). Note: this only even works for pip right now because it's not yet smart enough to have a dependency resolver (which raises a whole different set of problems), but that might become affected very soon, as well, because it's about to get one: see https:/
The soupsieve dependency should instead be specified with PEP 508 environment markers. This will resolve the issue with PyPI's metadata for beautifulsoup while remaining compatible with pip, as well (which has supported PEP 508 since May 2016).
Related branches
- Leonard Richardson: Approve
-
Diff: 26 lines (+4/-5)1 file modifiedsetup.py (+4/-5)
Changed in beautifulsoup: | |
assignee: | nobody → Mike Nerone (mikenerone) |
Changed in beautifulsoup: | |
status: | Fix Committed → Fix Released |
Merged as revision 585.