Skip to content

The flag does not respect package resolver results and leads to inconsistent lock files. #5613

@matejsp

Description

@matejsp

Issue description

We have just updated pipenv and were negatively surprised that this feature is about to be removed.

The flag --keep-outdated has been deprecated for removal.The flag does not respect package resolver results and leads to inconsistent lock files. Please pin relevant requirements in your Pipfile and discontinue use of this flag.

I never saw any discussion regarding keeping keep-outdated flag but this feature is one of the most useful features in pipenv at least in very large projects such as monoliths. Please don't remove it. #5544 by @matteius

In our project we have around 110 depedencies and we rely on pipenv keep-updated so the developers update only their and not all dependencies. We specify only directly used dependencies and rely on lock file to have a list of transient dependencies.
We occasionally pin transient dependencies when we see incompatibilities.

Since we have the work split between different teams and dependencies are common in our monolith we have a problem if one team member updates all other dependencies and very often breaks the project. Some (binary wheels) are really problematic such as cryptography because it could fails just on some target systems.

Based on proposal that we should pin ALL transient dependencies if we want to retain control over dependencies making everything unreadable and hard to maintain:

  • you cannot distinct between pinning a transient or first level dependency (at least in not current Pipfile format)
  • you cannot do updates one by one without affecting all other dependencies
  • you cannot split dev process of updating all dependencies a release with just updated dependencies
  • pipenv graph is broken since it displays all pinned dependencies as first level dependencies.
  • every developer when introducing new depedency or even upgrading will need to track down all the transient dependencies and pin them. if they don't other developers will broke their code by accidentally updating their dependencies.

Basically we rely on pipenv to do hard lifting for us and not manually track all dependencies. Manual work is error prone and would like to avoid. This is such important feature to us that we will migrate to another solution (like poetry).

The main reason why we even need such feature at all is because pipenv is lacking tooling for updating one by one dependency:
Like https://python-poetry.org/docs/cli/#update or npm or basically every other dep manager.

Expected result

Retain this feature or introduce new commands for updating controllably dependencies.

Actual result

The flag --keep-outdated has been deprecated for removal.The flag does not respect package resolver results and leads to inconsistent lock files. Please pin relevant requirements in your Pipfile and discontinue use of this flag.

Steps to replicate

use flag --keep-outdated

$ pipenv --support

Pipenv version: '2023.2.4'

Pipenv location: '/Users/myuser/.virtualenvs/bitstamp38/lib/python3.8/site-packages/pipenv'

Python location: '/Users/myuser/.virtualenvs/bitstamp38/bin/python3'

OS Name: 'posix'

User pip version: '22.3.1'

user Python installations found:

  • 3.11.2: /usr/local/bin/python3
  • 3.10.10: /Users/myuser/.pyenv/versions/3.10.10/bin/python3
  • 3.10.7: /Users/myuser/.pyenv/versions/3.10.7/bin/python3
  • 3.10.6: /Users/myuser/.pyenv/versions/3.10.6/bin/python3
  • 3.9.16: /usr/local/bin/python3.9
  • 3.9.13: /Users/myuser/.pyenv/versions/3.9.13/bin/python3
  • 3.9.6: /usr/bin/python3
  • 3.8.16: /Users/myuser/.virtualenvs/bitstamp38/bin/python3
  • 3.8.16: /Users/myuser/.virtualenvs/bitstamp38/bin/python
  • 3.8.16: /Users/myuser/.virtualenvs/bitstamp38/bin/python3
  • 3.8.16: /Users/myuser/.virtualenvs/bitstamp38/bin/python
  • 3.8.16: /usr/local/bin/python3.8
  • 3.8.16: /Users/myuser/.pyenv/versions/3.8.16/bin/python3
  • 3.8.13: /Users/myuser/.pyenv/versions/3.8.13/bin/python3
  • 3.8.12: /Users/myuser/.pyenv/versions/bitstamp38/bin/python3
  • 3.8.12: /Users/myuser/.pyenv/versions/3.8.12/bin/python3
  • 3.6.8: /usr/local/bin/python3.6
  • 3.6.8: /usr/local/bin/python3.6m

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.8.16',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '22.3.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 22.3.0: Thu Jan  5 20:53:49 PST '
                     '2023; root:xnu-8792.81.2~2/RELEASE_X86_64',
 'python_full_version': '3.8.16',
 'python_version': '3.8',
 'sys_platform': 'darwin'}

System environment variables:

  • TERM_PROGRAM
  • SHELL
  • TERM
  • TMPDIR
  • TERM_PROGRAM_VERSION
  • TERM_SESSION_ID
  • USER
  • SSH_AUTH_SOCK
  • PATH
  • LaunchInstanceID
  • __CFBundleIdentifier
  • PWD
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • SHLVL
  • HOME
  • LOGNAME
  • SECURITYSESSIONID
  • OLDPWD
  • ZSH
  • PAGER
  • LESS
  • LSCOLORS
  • _VIRTUALENVWRAPPER_API
  • VIRTUALENVWRAPPER_SCRIPT
  • VIRTUALENVWRAPPER_PYTHON
  • NVM_DIR
  • NVM_CD_FLAGS
  • NVM_BIN
  • NVM_INC
  • VIRTUALENVWRAPPER_PROJECT_FILENAME
  • VIRTUALENVWRAPPER_WORKON_CD
  • WORKON_HOME
  • VIRTUALENVWRAPPER_HOOK_DIR
  • VIRTUAL_ENV
  • PS1
  • CD_VIRTUAL_ENV
  • LANG
  • LC_ALL
  • LC_CTYPE
  • _
  • __CF_USER_TEXT_ENCODING
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_PYTHON_PATH
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /Users/myuser/.virtualenvs/b38/bin:/Users/myuser/.rd/bin:/Users/myuser/.nvm/versions/node/v14.18.2/bin:/Users/myuser/apache-maven-3.8.2/bin:/usr/local/opt/mysql@5.7/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /Users/myuser/projects/b/pipenvs
  • VIRTUAL_ENV: /Users/myuser/.virtualenvs/b38

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions