madpah / requirements-parser

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

Parsing fragment supports arbitrary keys #23

Closed mshenfield closed 8 years ago

mshenfield commented 8 years ago

This switches parsing the fragment (string following '#' at the end of a requirement) from looking for 'egg' at the beginning of the fragment to allowing any key value pair. These can be extracted as needed - right now only the 'egg' key is used to get the name of the package.

Tests include URI with a single fragment, and multiple fragments.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.6%) to 92.806% when pulling f9559f7c364c9ea8e9e4d3a888ee33266de69e40 on mshenfield:issue-22-support-hashlib-hashes-in-uri-fragment into c84b72ad3f4318832cf87f9610c2f7a49c590964 on davidfischer:master.

coveralls commented 8 years ago

Coverage Status

Coverage decreased (-0.6%) to 92.806% when pulling f9559f7c364c9ea8e9e4d3a888ee33266de69e40 on mshenfield:issue-22-support-hashlib-hashes-in-uri-fragment into c84b72ad3f4318832cf87f9610c2f7a49c590964 on davidfischer:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+4.4%) to 97.842% when pulling 5db4fde6d387c276f0d87c4e06bef309acedfd21 on mshenfield:issue-22-support-hashlib-hashes-in-uri-fragment into c84b72ad3f4318832cf87f9610c2f7a49c590964 on davidfischer:master.

mshenfield commented 8 years ago

The 3.2.5 branch is failing mysteriously -

File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/pkg_resources/__init__.py", line 2310, in load
    return self.resolve()
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/pkg_resources/__init__.py", line 2316, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/coverage/__init__.py", line 13, in <module>
    from coverage.control import Coverage, process_startup
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/coverage/control.py", line 15, in <module>
    from coverage.annotate import AnnotateReporter
  File "/home/travis/virtualenv/python3.2.5/lib/python3.2/site-packages/coverage/annotate.py", line 85
    dest.write(u'  ')
                   ^
SyntaxError: invalid syntax
coveralls commented 8 years ago

Coverage Status

Coverage increased (+4.4%) to 97.842% when pulling c9fc17d4d5f00655e2c411a2e21760d2a181d51c on mshenfield:issue-22-support-hashlib-hashes-in-uri-fragment into c84b72ad3f4318832cf87f9610c2f7a49c590964 on davidfischer:master.

coveralls commented 8 years ago

Coverage Status

Coverage increased (+4.4%) to 97.842% when pulling 09379dc16995b6cf2b88381a2830b1aa695cd08e on mshenfield:issue-22-support-hashlib-hashes-in-uri-fragment into c84b72ad3f4318832cf87f9610c2f7a49c590964 on davidfischer:master.