Environment
Description
https://gitlab.com/KOLANICH/RichConsole/-/jobs/110427970
[options.extras_require]
colorama colors = colorama @ git+https://github.com/tartley/colorama.git#egg=colorama-dev
plumbum colors = plumbum @ git+https://github.com/tomerfiliba/plumbum.git#egg=plumbum-dev
colored colors = colored @ git+https://gitlab.com/dslackw/colored.git#egg=colored-dev
Expected behavior
Should work fine
How to Reproduce
Output
File "/usr/local/site-packages/pip/_internal/resolve.py", line 306, in _resolve_one
set(req_to_install.extras) - set(dist.extras)
File "/usr/local/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2840, in extras
return [dep for dep in self._dep_map if dep]
File "/usr/local/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2885, in _dep_map
self.__dep_map = self._compute_dependencies()
File "/usr/local/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2895, in _compute_dependencies
reqs.extend(parse_requirements(req))
File "/usr/local/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2956, in parse_requirements
yield Requirement(line)
File "/usr/local/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2965, in __init__
raise RequirementParseError(str(e))
pip._vendor.pkg_resources.RequirementParseError: Parse error at "'extra =='": Expected stringEnd
Looks like you found another bug in wheel. And pkg_resources...
package @ URL; markers
, which is invalid, the correct syntax is package @ URL ; markers
, note the space after the URL before ;
pkg_resources.Requirement
is also buggy: >> import pkg_resources
>>> pkg_resources.Requirement('foo @ http://host/foo.zip ; extra == "extra"')
Requirement.parse('foo@ http://host/foo.zip; extra == "extra"')
pip uses vendored pkg_resources, doesn't it?
Yes.
It seems that this bug also calls for adding some CI testing around this function involving: building a package with extras_require, installing it, validating that it works.
So is this fixed in pip 19?
@richin13: yes, pip>=19.0
vendors packaging==19.0
with the fix, just make sure you're using wheel>=0.32.3
to generate the wheels.
@pypa/pip-committers: this can be closed.
Was this ever added to news?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
@richin13: yes,
pip>=19.0
vendorspackaging==19.0
with the fix, just make sure you're usingwheel>=0.32.3
to generate the wheels.@pypa/pip-committers: this can be closed.