Skip to content

Commit

Permalink
Fix breakage that was almost released
Browse files Browse the repository at this point in the history
  • Loading branch information
matteius committed Oct 31, 2024
1 parent f50b405 commit 80ce555
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pipenv/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ def lockfile(self, categories=None):
for category in categories:
lock_section = lockfile.get(category)
if lock_section is None:
lockfile[category] = lock_section = {}
lockfile[category] = {}

return lockfile

Expand Down
10 changes: 3 additions & 7 deletions pipenv/utils/locking.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,8 @@ def format_requirement_for_lockfile(
vcs = link.scheme.split("+", 1)[0]

# Get VCS URL from original deps or normalize the link URL
if name in original_deps:
entry[vcs] = original_deps[name]
else:
vcs_url, _ = normalize_vcs_url(link.url)
entry[vcs] = vcs_url
vcs_url, _ = normalize_vcs_url(link.url)
entry[vcs] = vcs_url

# Handle subdirectory information
if pipfile_entry.get("subdirectory"):
Expand Down Expand Up @@ -137,7 +134,7 @@ def get_locked_dep(project, dep, pipfile_section, current_entry=None):
# initialize default values
is_top_level = False

# # if the dependency has a name, find corresponding entry in pipfile
# if the dependency has a name, find corresponding entry in pipfile
if isinstance(dep, dict) and dep.get("name"):
dep_name = pep423_name(dep["name"])
for pipfile_key, pipfile_entry in pipfile_section.items():
Expand Down Expand Up @@ -183,7 +180,6 @@ def prepare_lockfile(project, results, pipfile, lockfile_section, old_lock_data=
# If the current entry is a dict, merge the new details
lockfile_section[dep_name].update(lockfile_entry[dep_name])
lockfile_section[dep_name] = translate_markers(lockfile_section[dep_name])

return lockfile_section


Expand Down

0 comments on commit 80ce555

Please sign in to comment.