Skip to content

Commit

Permalink
Merge pull request #80 from sarugaku/fix-normalization
Browse files Browse the repository at this point in the history
Dont canonicalize named requirement lines
  • Loading branch information
techalchemy authored Oct 9, 2018
2 parents 79c8b9a + d43d164 commit b19a402
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/79.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed a bug in named requirement normalization which caused querying the index to fail when looking up requirements with dots in their names.
5 changes: 4 additions & 1 deletion src/requirementslib/models/requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,10 @@ def from_pipfile(cls, name, pipfile):

@property
def line_part(self):
return "{0}".format(canonicalize_name(self.name))
# FIXME: This should actually be canonicalized but for now we have to
# simply lowercase it and replace underscores, since full canonicalization
# also replaces dots and that doesn't actually work when querying the index
return "{0}".format(self.name.lower().replace("_", "-"))

@property
def pipfile_part(self):
Expand Down

0 comments on commit b19a402

Please sign in to comment.