madpah / requirements-parser

A Pip requirements file parser.
https://requirements-parser.readthedocs.io
Apache License 2.0
125 stars 41 forks source link

parse_editable not matching requirement file pointing to local project. #89

Closed g-carre closed 1 year ago

g-carre commented 1 year ago

When parsing a requirement.txt with a line like the following
-e ../project/sources we end up with a raised exception from parse_editable line 157: AssertionError: This should match everything

I believe the regular expresssion from https://github.com/madpah/requirements-parser/blob/1ce923617147dd984c280d56cb1f02fcd3589a7c/requirements/requirement.py#L41 should be corrected to LOCAL_REGEX = re.compile(r'^((?P<scheme>file)://)?(?P<path>[^#]+)(#?P<fragment>\S+)?')

g-carre commented 1 year ago

Ouch this is already mentioned in https://github.com/madpah/requirements-parser/issues/84 closing