Pipenv 2022.10.25 does not appear to correctly prune obsolete dependencies #5456
Labels
Priority: High
This item is high priority and should be resolved quickly.
Type: Bug 🐛
This issue is a bug.
Type: Regression
This issue is a regression of a previous behavior.
Issue description
When updating packages in a Pipfile to versions that vendor away certain dependencies, these dependencies are not pruned from the Pipfile.lock
Expected result
The Pipfile.lock doesn't contain dependencies that are not listed in the Pipfile and not depended on by any (sub-)dependencies of listed packages, either. Pipenv version 2022.6.7 does this correctly.
Actual result
Obsoleted package dependencies remain in the Pipfile.lock
Steps to replicate
We start with a Pipfile containing
The lock file generated with those dependencies contains, among others,
py
andpytest-forked
. After updating the Pipfile's contents toand running
pipenv lock
, the packages mentioned above are still listed in the lock file, despite not being depended on any more by either package (as evidenced bypipenv graph
).$ pipenv --support
Pipenv version:
'2022.10.25'
Pipenv location:
'/usr/local/lib/python3.10/site-packages/pipenv'
Python location:
'/usr/local/bin/python'
OS Name:
'posix'
User pip version:
'22.3'
user Python installations found:
3.10.5
:/usr/local/bin/python
3.10.5
:/usr/local/bin/python3
3.9.2
:/usr/bin/python3.9
3.9.2
:/usr/bin/python3
PEP 508 Information:
System environment variables:
SHELL
COLORTERM
TERM_PROGRAM_VERSION
HOSTNAME
PYTHON_VERSION
SSH_AUTH_SOCK
REMOTE_CONTAINERS_IPC
PWD
PYTHON_SETUPTOOLS_VERSION
HOME
LANG
REMOTE_CONTAINERS
GPG_KEY
PYTHONPATH
TERM
REMOTE_CONTAINERS_SOCKETS
SHLVL
PYTHON_PIP_VERSION
PYTHON_GET_PIP_SHA256
PYTHON_GET_PIP_URL
BROWSER
PATH
PIP_NO_CACHE_DIR
TERM_PROGRAM
VSCODE_IPC_HOOK_CLI
_
PIP_DISABLE_PIP_VERSION_CHECK
PIP_PYTHON_PATH
PYTHONDONTWRITEBYTECODE
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/vscode/vscode-server/bin/linux-x64/8fa188b2b301d36553cbc9ce1b0a146ccb93351f/bin/remote-cli:/root/.local/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
SHELL
:/bin/bash
LANG
:C.UTF-8
PWD
:/workspaces/pipenv-break
Contents of
Pipfile
('/workspaces/pipenv-break/Pipfile'):Contents of
Pipfile.lock
('/workspaces/pipenv-break/Pipfile.lock'):The text was updated successfully, but these errors were encountered: