Closed treyhunner closed 11 years ago
According to the requirement file spec, only "line[s] beginning with # is treated as a comment and ignored". The hash character cannot simply be used as a comment as that would break things like git+http://repo/my_project.git#egg=SomeProject
.
Now I'm not opposed to some level of compatibility if this is breaking a well used requirement file for a major package but it should probably throw a warning or something.
All I know right now is that I use #
at the ends of my lines in my requirements file and it works. I plan to remove line comments now that I know they're wrong.
If you don't think this is very common maybe the issue should be closed until someone reopens it in the future.
Actually using pkg_resources (see #4) should resolve this as well.
>>> pkg_resources.Requirement.parse('reqfile-parser==0.1.0 # Heres a comment')
Requirement.parse('reqfile-parser==0.1.0')
requirements.txt:
That file fails at parsing because of the
#
.