pipenv lock --keep-outdated adds future dependencies #4455
Labels
Category: Dependency Resolution
Issue relates to dependency resolution.
Type: Duplicate
This issue is a duplicate of an already-existing issue.
Issue description
Running
pipenv lock --clear --keep-outdated
updates Pipfile.lock by adding future dependencies of packages according to Pipfile.Note that I specifying dependencies in Pipfile like
pytest = "*"
. But I do not wish to update all packages whenever I am updating a single package which leads to this issue.The effect also takes place when using commands like
pipenv clean
which has no--keep-outdated
option so you can end up breaking dependencies because dependencies of the installed version may be removed as future version are used for calculating dependencies.Expected result
No new packages should be added to Pipfile.lock when running
pipenv lock --clear --keep-outdated
.Actual result
pytest 5.3.5 requires:
packaging, more-itertools, wcwidth, attrs, py, pluggy
pytest 6.0.1 requires:
pluggy, iniconfig, attrs, py, toml, more-itertools, packaging
With pytest 5.3.5 installed (and locked in Pipfile.lock) and
pytest = "*"
in Pipfile, I get following significant diffs from runningpipenv lock --clear --keep-outdated
Steps to replicate
alternatively, try
pipenv clean
before lock to see how it break pytest by removing wcwidth.See https://github.com/bbolvig/pipenv-clean-bug/ for Pipfile.lock between steps.
$ pipenv --support
Pipenv version:
'2020.8.13'
Pipenv location:
'/home/boris/.local/lib/python3.8/site-packages/pipenv'
Python location:
'/home/boris/.pyenv/versions/3.8.5/bin/python'
Python installations found:
3.8.5
:/home/boris/.pyenv/versions/3.8.5/bin/python3.8
3.8.2
:/usr/bin/python3.8
3.8.2
:/usr/bin/python3
3.8.2
:/bin/python3.8
3.8.2
:/bin/python3
3.7.6
:/home/boris/.pyenv/versions/3.7.6/bin/python3.7
2.7.18
:/usr/bin/python2.7
2.7.18
:/usr/bin/python2
2.7.18
:/bin/python2.7
2.7.18
:/bin/python2
PEP 508 Information:
System environment variables:
SHELL
SESSION_MANAGER
QT_ACCESSIBILITY
COLORTERM
PYENV_SHELL
CHAI_ENV
XDG_CONFIG_DIRS
XDG_MENU_PREFIX
GNOME_DESKTOP_SESSION_ID
GTK_IM_MODULE
TMUX
LANGUAGE
QT4_IM_MODULE
GNOME_SHELL_SESSION_MODE
SSH_AUTH_SOCK
XMODIFIERS
DESKTOP_SESSION
SSH_AGENT_PID
EDITOR
GTK_MODULES
PWD
XDG_SESSION_DESKTOP
LOGNAME
XDG_SESSION_TYPE
GPG_AGENT_INFO
XAUTHORITY
GJS_DEBUG_TOPICS
WINDOWPATH
HOME
USERNAME
IM_CONFIG_PHASE
LANG
LS_COLORS
XDG_CURRENT_DESKTOP
VTE_VERSION
GNOME_TERMINAL_SCREEN
INVOCATION_ID
MANAGERPID
CLUTTER_IM_MODULE
GJS_DEBUG_OUTPUT
LESSCLOSE
XDG_SESSION_CLASS
PYTHONPATH
TERM
LESSOPEN
USER
TMUX_PANE
GNOME_TERMINAL_SERVICE
VISUAL
DISPLAY
SHLVL
QT_IM_MODULE
XDG_RUNTIME_DIR
PYENV_ROOT
JOURNAL_STREAM
XDG_DATA_DIRS
PATH
GDMSESSION
DBUS_SESSION_BUS_ADDRESS
OLDPWD
_
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/boris/.local/bin:/home/boris/.pyenv/shims:/home/boris/.pyenv/bin:/home/boris/.pyenv/shims:/home/boris/.pyenv/bin:/home/boris/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
SHELL
:/bin/bash
EDITOR
:vim
LANG
:en_US.UTF-8
PWD
:/home/boris/work/pytestinstall
Contents of
Pipfile
('/home/boris/work/pytestinstall/Pipfile'):Contents of
Pipfile.lock
('/home/boris/work/pytestinstall/Pipfile.lock'):The text was updated successfully, but these errors were encountered: