Merge pull request #4521 from pypa/bugfix/4387

Bugfix/4387 VCS dependencies always satisfy even if the ref has changed
This commit is contained in:
Frost Ming
2020-11-05 11:41:47 +08:00
committed by GitHub
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
Fix a bug that VCS dependencies always satisfy even if the ref has changed.
+2
View File
@@ -790,6 +790,8 @@ class Environment(object):
vcs_type == req.vcs and commit_id == req.commit_hash
and direct_url_metadata["url"] == pipfile_part[req.vcs]
)
elif req.is_vcs or req.is_file_or_url:
return False
elif req.line_instance.specifiers is not None:
return req.line_instance.specifiers.contains(
match.version, prereleases=True