Skip to content

Pinned version in dev-packages ignored when used by main packages #5528

Open
@juanitosvq

Description

@juanitosvq

Hi, this may be expected behaviour but I wanted to double check. Couldn't find a clear answer in the docs or in an issue.

Issue description

When I pin a dependency in my dev-packages, I would expect pipenv to honour that and either:

  • Install that version as part of the dev packages
  • Or fail with a resolution failure if there is another package trying to install a different version from the one I specified.

Expected result

In my example below, if I pin packaging to v21.3 in my dev-packages, I would expect to either see that version or get resolution failure.

Actual result

In my example below, given that apispec requires any version of packaging, it is installing v22.0 in both packages and dev-packages. I wouldn't expect to see this version in dev-packages, instead I would expect to see v21.3 or resolution failure.

Steps to replicate

Provided pipenv --support output below.

Thanks in advance.


Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.

$ pipenv --support

Pipenv version: '2022.11.30'

Pipenv location: '/home/REDACTED/lib/python3.9/site-packages/pipenv'

Python location: '/home/REDACTED/bin/python'

OS Name: 'posix'

User pip version: '22.3'

user Python installations found:

  • 3.9.16: /home/REDACTED/bin/python3.9
  • 3.9.16: /home/REDACTED/bin/python3
  • 3.9.16: /home/REDACTED/bin/python
  • 3.9.16: /home/REDACTED/bin/python3.9
  • 3.9.16: /home/REDACTED/bin/python3
  • 3.9.16: /home/REDACTED/bin/python
  • 3.9.16: /usr/bin/python3.9
  • 3.9.16: /bin/python3.9
  • 3.8.10: /usr/bin/python3
  • 3.8.10: /usr/bin/python3.8
  • 3.8.10: /bin/python3
  • 3.8.10: /bin/python3.8
  • 3.7.16: /usr/bin/python3.7m
  • 3.7.16: /usr/bin/python3.7
  • 3.7.16: /bin/python3.7m
  • 3.7.16: /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:

{'implementation_name': 'cpython',
 'implementation_version': '3.9.16',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '5.15.0-56-generic',
 'platform_system': 'Linux',
 'platform_version': '#62~20.04.1-Ubuntu SMP Tue Nov 22 21:24:20 UTC 2022',
 'python_full_version': '3.9.16',
 'python_version': '3.9',
 'sys_platform': 'linux'}

System environment variables:

  • SHELL
  • SESSION_MANAGER
  • QT_ACCESSIBILITY
  • NVM_RC_VERSION
  • SNAP_REVISION
  • XDG_CONFIG_DIRS
  • XDG_MENU_PREFIX
  • GNOME_DESKTOP_SESSION_ID
  • SNAP_REAL_HOME
  • TERMINAL_EMULATOR
  • SNAP_USER_COMMON
  • LANGUAGE
  • GNOME_SHELL_SESSION_MODE
  • SSH_AUTH_SOCK
  • TERM_SESSION_ID
  • SNAP_INSTANCE_KEY
  • XMODIFIERS
  • DESKTOP_SESSION
  • SSH_AGENT_PID
  • BAMF_DESKTOP_FILE_HINT
  • GTK_MODULES
  • PWD
  • XDG_SESSION_DESKTOP
  • LOGNAME
  • XDG_SESSION_TYPE
  • GPG_AGENT_INFO
  • XAUTHORITY
  • DESKTOP_STARTUP_ID
  • SNAP_CONTEXT
  • GJS_DEBUG_TOPICS
  • WINDOWPATH
  • HOME
  • USERNAME
  • IM_CONFIG_PHASE
  • LANG
  • LS_COLORS
  • XDG_CURRENT_DESKTOP
  • VIRTUAL_ENV
  • SNAP_ARCH
  • SNAP_INSTANCE_NAME
  • SNAP_USER_DATA
  • INVOCATION_ID
  • MANAGERPID
  • SNAP_REEXEC
  • GJS_DEBUG_OUTPUT
  • NVM_DIR
  • LESSCLOSE
  • XDG_SESSION_CLASS
  • TERM
  • AWS_EIO_CD_PROFILE
  • LESSOPEN
  • USER
  • SNAP
  • SNAP_COMMON
  • SNAP_VERSION
  • DISPLAY
  • SHLVL
  • NVM_CD_FLAGS
  • SNAP_LIBRARY_PATH
  • SNAP_COOKIE
  • QT_IM_MODULE
  • SNAP_DATA
  • XDG_RUNTIME_DIR
  • PS1
  • SNAP_NAME
  • JOURNAL_STREAM
  • XDG_DATA_DIRS
  • PATH
  • GDMSESSION
  • DBUS_SESSION_BUS_ADDRESS
  • GIO_LAUNCHED_DESKTOP_FILE_PID
  • GIO_LAUNCHED_DESKTOP_FILE
  • _
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PIP_PYTHON_PATH
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/REDACTED/bin:/home/REDACTED/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
  • SHELL: /bin/bash
  • LANG: en_CA.UTF-8
  • PWD: /home/REDACTED
  • VIRTUAL_ENV: /home/REDACTED

Contents of Pipfile ('/home/REDACTED/Pipfile'):

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[packages]
apispec = "*"

[requires]
python_version = "3.9"

[pipenv]
allow_prereleases = true

[dev-packages]
packaging = "==21.3"

Contents of Pipfile.lock ('/home/REDACTED/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "46f6381ed3ae611fdfc008749d0e138dacb07e741b0b7888ecc136adbbfad371"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.9"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "apispec": {
            "hashes": [
                "sha256:d97f0ae9c65133185b9ed9c5be1a434eb85627dfa33c4c53cabda122256c1b67",
                "sha256:e76d80b739edef4be213092a6384ad7fd933ba7d64f6d5a0aff8d4da1bef7887"
            ],
            "index": "pypi",
            "version": "==6.0.2"
        },
        "packaging": {
            "hashes": [
                "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3",
                "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==22.0"
        }
    },
    "develop": {
        "packaging": {
            "hashes": [
                "sha256:2198ec20bd4c017b8f9717e00f0c8714076fc2fd93816750ab48e2c41de2cfd3",
                "sha256:957e2148ba0e1a3b282772e791ef1d8083648bc131c8ab0c1feba110ce1146c3"
            ],
            "markers": "python_version >= '3.7'",
            "version": "==22.0"
        },
        "pyparsing": {
            "hashes": [
                "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb",
                "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"
            ],
            "markers": "python_full_version >= '3.6.8'",
            "version": "==3.0.9"
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: Documentation 📖This issue relates to documentation of pipenv.Type: Question ❔This is a question or a request for support.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions