Skip to content

Optional dependencies support #68

Description

@andriyor

Trying to parse such requirements https://github.com/psf/requests/blob/main/requirements-dev.txt

-e .[socks]
pytest>=2.8.0,<=6.2.5
pytest-cov
pytest-httpbin==1.0.0
pytest-mock==2.0.0
httpbin==0.7.0
trustme
wheel

# Flask Stack
Flask>1.0,<2.0
markupsafe<2.1

and parser produces an error

❯ python req_parse.py
Traceback (most recent call last):
  File "/Users/andrejorehov/PycharmProjects/pypi-github-check/req_parse.py", line 13, in <module>
    for req in requirements.parse(fd):
  File "/Users/andrejorehov/.pyenv/versions/3.9.6/lib/python3.9/site-packages/requirements/parser.py", line 87, in parse
    yield Requirement.parse(line)
  File "/Users/andrejorehov/.pyenv/versions/3.9.6/lib/python3.9/site-packages/requirements/requirement.py", line 251, in parse
    return cls.parse_editable(
  File "/Users/andrejorehov/.pyenv/versions/3.9.6/lib/python3.9/site-packages/requirements/requirement.py", line 157, in parse_editable
    assert local_match is not None, 'This should match everything'
AssertionError: This should match everything

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions