pipenv icon indicating copy to clipboard operation
pipenv copied to clipboard

Reproducable lock file

Open matejsp opened this issue 3 years ago • 3 comments

Lock file is getting changed each time somebody runs the pipenv sync and lock.

What happens is that markers are randomly applied. Sometimes:

            "markers": "python_version < '3.11'",
            "markers": "python_version >= '3.7'",

And this is randomly applied to different dependencies. We commit lock file to git and it is really annoying to have each run change the lock file.


(crypt) ➜ pipenvs git:(topic/django4) ✗ pipenv --support
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.9.21'

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

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

OS Name: 'posix'

User pip version: '22.2.2'

user Python installations found:

  • 3.10.6: /usr/local/bin/python3
  • 3.9.14: /usr/local/bin/python3.9
  • 3.8.14: /usr/local/bin/python3.8
  • 3.8.13: /Users/myuser/.virtualenvs/bts-crypt/bin/python3
  • 3.8.13: /Users/myuser/.virtualenvs/bts-crypt/bin/python
  • 3.8.13: /Users/myuser/.virtualenvs/bts-crypt/bin/python3
  • 3.8.13: /Users/myuser/.virtualenvs/bts-crypt/bin/python
  • 3.8.13: /Users/myuser/.pyenv/versions/3.8.13/bin/python3
  • 3.8.9: /usr/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.13',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '21.6.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT '
                     '2022; root:xnu-8020.141.5~2/RELEASE_X86_64',
 'python_full_version': '3.8.13',
 '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
  • __CFBundleIdentifier
  • PWD
  • XPC_FLAGS
  • XPC_SERVICE_NAME
  • SHLVL
  • HOME
  • LOGNAME
  • 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
  • PS1
  • VIRTUAL_ENV
  • 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/bts-crypt/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/[email protected]/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin
  • SHELL: /bin/bash
  • LANG: C
  • PWD: /Users/myuser/projects/crypt/pipenvs
  • VIRTUAL_ENV: /Users/myuser/.virtualenvs/crypt

matejsp avatar Sep 22 '22 06:09 matejsp

And another case for same dep:

            "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'",
            "markers": "python_version not in '3.0, 3.1, 3.2, 3.3' and python_full_version >= '2.7.0'",

matejsp avatar Sep 22 '22 06:09 matejsp

Same as #4660

matteius avatar Sep 22 '22 07:09 matteius

This may fix it: https://github.com/pypa/pipenv/pull/5373

matteius avatar Sep 22 '22 08:09 matteius

Please try pipenv==2022.9.24

matteius avatar Sep 24 '22 23:09 matteius