Skip to content

Commit

Permalink
solving for issue where vcs ref is getting dropped from resolver entry.
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Oct 22, 2024
1 parent ba16435 commit 519ae5f
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions pipenv/resolver.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,9 +272,10 @@ def get_cleaned_dict(self):

# Handle VCS entries
for key in VCS_LIST:
if key in self.pipfile_dict:
self.entry_dict[key] = self.entry_dict[key]
if key in self.lockfile_dict:
self.entry_dict[key] = self.lockfile_dict[key]
self.entry_dict["ref"] = self.lockfile_dict["ref"]
self.entry_dict.pop("version", None)
return self.entry_dict

@property
Expand All @@ -297,7 +298,7 @@ def pipfile_entry(self):

@property
def entry(self):
return self.make_requirement(self.name, self.entry_dict)
return self.make_requirement(self.name, self.lockfile_dict)

@property
def normalized_name(self):
Expand Down Expand Up @@ -562,9 +563,7 @@ def clean_results(results, resolver, project, category):
lockfile = project.lockfile_content

Check failure on line 563 in pipenv/resolver.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F841)

pipenv/resolver.py:563:5: F841 Local variable `lockfile` is assigned to but never used
lockfile_section = get_lockfile_section_using_pipfile_category(category)

Check failure on line 564 in pipenv/resolver.py

View workflow job for this annotation

GitHub Actions / ruff

Ruff (F841)

pipenv/resolver.py:564:5: F841 Local variable `lockfile_section` is assigned to but never used
reverse_deps = project.environment.reverse_dependencies()
new_results = [
r for r in results if r["name"] not in lockfile.get(lockfile_section, {})
]
new_results = []
for result in results:
name = result.get("name")
entry_dict = result.copy()
Expand Down

0 comments on commit 519ae5f

Please sign in to comment.