Files
Matt Davis 87dffe0aa5 fix: don't mutate cached parsed_pipfile when locking deps (#6657)
* fix: don't mutate cached parsed_pipfile when locking deps

get_locked_dep popped ``version`` and ``ref`` directly off the entry it
received from ``pipfile_section``.  Since #6649 made ``parsed_pipfile``
return a cached TOMLDocument by reference, those pops persisted across
the rest of the pipenv invocation — a subsequent ``write_toml`` (e.g.
``add_pipfile_entry_to_pipfile`` for the newly installed package) would
emit ``six = {}`` instead of ``six = {version = "*"}`` and strip the
version from any inline-table or outline-table siblings.

Copy the dict before scrubbing those keys.  Add a unit regression test
that asserts get_locked_dep leaves the section untouched.

Fixes the integration regression hit by ``test_rewrite_outline_table``
and ``test_rewrite_outline_table_ooo`` on main since the pip 26.1
vendoring run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Fix recursive pipenv test bootstrap dependency

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-28 07:42:39 -04:00
..
2024-10-29 22:35:03 +01:00
2022-06-21 08:07:44 +02:00
2024-10-29 22:35:03 +01:00