-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment markers in dependencies should be merged, not overriden by each other #2662
Comments
I've also faced with the same issue: I've tried the script from @Jamim and here are my results: diff --git a/Pipfile.lock b/Pipfile.lock
index d77c7e4..c306df2 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -80,7 +80,7 @@
"sha256:330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca",
"sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50"
],
- "markers": "python_version < '3.0'",
+ "markers": "python_version < '3.3'",
"version": "==1.0.2"
},
"mock": {
Something was changed on attempt 5 my env on Ubuntu 18.04: $ pipenv --supportPipenv version: Pipenv location: Python location: Other Python installations in
PEP 508 Information:
System environment variables:
Pipenv–specific environment variables: Debug–specific environment variables:
|
@nikolay-saskovets What is the package that produces the different output? This information would save us much time to investigate. Without looking into this too deeply, it is likely due to how a certain package is distributed in an undeterministic way, but it would be much easier to explain this with a concrete example. |
@uranusjr this output is about installing those two packages develop:$ git diff -U5
diff --git a/Pipfile.lock b/Pipfile.lock
index d77c7e4..c306df2 100644
--- a/Pipfile.lock
+++ b/Pipfile.lock
@@ -78,11 +78,11 @@
"funcsigs": {
"hashes": [
"sha256:330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca",
"sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50"
],
- "markers": "python_version < '3.0'",
+ "markers": "python_version < '3.3'",
"version": "==1.0.2"
}, But it seems like such issues may caught with some other packages from PyPi. We are faced with such problem in a real project with other packages, too. I think @Jamim may provide more info as «topic starter» :-) |
Thanks! I think I have an idea of what’s going on, but I’ll need some time to investigate it further to make sure my guess is correct. It would be super helpful if more details could be provideded in the meantime. What would be helpful are:
|
Thank you, @nikolay-saskovets! Hi @uranusjr, The simplest way to reproduce the issue is to run the script from Steps to replicate. In the example the issue affects
So every time when I run There are a lot of |
@uranusjr You can found |
|
Quick update: I think the problem is a race condition, for funcsig it’s between mock and pytest. They are picking up different conditions from each source. They should be instead consolidated into one instead (ideally |
is this only affecting |
For some reason, pipenv can add Heroku fails to deploy a project before I clean up all the markers from the lock file manually. |
oh boy the null markers thing is actually quite bad, but i think that's fixed merging markers is incredibly difficult it turns out, I've spent like several months on this over in sarugaku/passa#59 and it still isn't quite finished If anyone is very good at set math, you can probably help with that... |
I am experiencing the same issue (fluctuating Does a given
We schedule sed -i '/"markers": "python_version/d' Pipfile.lock before committing [requires]
python_version = "..." is present? |
It does not, but a missing |
I believe this has been resolve and/or is stale. |
Issue description
Pipenv.lock
file might contain differentmarkers
afterpipenv lock
.This issue is quite annoying when you deal with a
Pipfile
that contains a lot of requirements especially when most of them are outdated.Expected result
Markers remain unchanged after
pipenv lock
if nothing has been changed inPipfile
and on thePyPI
.Actual result
Markers change unpredictably.
Steps to replicate
You can use this script to reproduce the bug.
Please see the asciicast for the details.
Environment
I experience this issue
pipenv
fromPyPI
and frommaster
of this repopipenv
fromPyPI
$ pipenv --support # Gentoo
Pipenv version:
'2018.7.1.dev0'
Pipenv location:
'/home/mim/src/pipenv/pipenv'
Python location:
'/usr/bin/python3.7'
Other Python installations in
PATH
:2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.6
:/usr/bin/python3.6m
3.6
:/usr/bin/python3.6
3.7
:/usr/bin/python3.7m
3.7
:/usr/bin/python3.7
3.7.0
:/usr/bin/python
2.7.15
:/usr/bin/python2
3.7.0
:/usr/bin/python3
PEP 508 Information:
System environment variables:
LC_ALL
LS_COLORS
STY
ANDROID_HOME
XDG_MENU_PREFIX
LANG
LESS
DISPLAY
OPENGL_PROFILE
CONFIG_PROTECT_MASK
EDITOR
GPG_TTY
COLORTERM
ASCIINEMA_REC
JAVA_HOME
GCC_SPECS
SSH_AUTH_SOCK
GLADE_CATALOG_PATH
VBOX_APP_HOME
HUSHLOGIN
USER
GLADE_MODULE_PATH
PAGER
DESKTOP_SESSION
PWD
HOME
MANPAGER
WINDOW
SSH_AGENT_PID
GSETTINGS_BACKEND
XDG_DATA_DIRS
JDK_HOME
GLADE_PIXMAP_PATH
GTK_MODULES
MAIL
WINDOWPATH
CONFIG_PROTECT
SHELL
TERM
VTE_VERSION
JAVAC
XDG_CURRENT_DESKTOP
OPENCL_PROFILE
ANDROID_SWT
MOZ_GMP_PATH
SHLVL
LANGUAGE
MANPATH
WINDOWID
LOGNAME
DBUS_SESSION_BUS_ADDRESS
XSESSION
XAUTHORITY
ANT_HOME
XDG_CONFIG_DIRS
PATH
INFOPATH
TERMCAP
SESSION_MANAGER
LESSOPEN
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/mim/.local/bin:/home/mim/.local/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/8.1.0:/usr/lib/llvm/6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/opt/android-sdk-update-manager/tools:/opt/android-sdk-update-manager/platform-tools:/home/mim/.npm-global/bin:/home/mim/.npm-global/bin:
SHELL
:/bin/bash
EDITOR
:/bin/nano
LANG
:ru_RU.utf8
PWD
:/home/mim
$ pipenv --support # Ubuntu 16.04
Pipenv version:
'2018.7.1'
Pipenv location:
'/home/mim/.local/lib/python3.6/site-packages/pipenv'
Python location:
'/usr/bin/python3.6'
Other Python installations in
PATH
:2.7
:/usr/bin/python2.7
2.7
:/usr/bin/python2.7
3.5
:/usr/bin/python3.5m
3.5
:/usr/bin/python3.5
3.6
:/usr/bin/python3.6m
3.6
:/usr/bin/python3.6
2.7.12
:/usr/bin/python
2.7.12
:/usr/bin/python2
3.5.2
:/usr/bin/python3
PEP 508 Information:
System environment variables:
XDG_VTNR
LC_PAPER
XDG_SESSION_ID
LC_ADDRESS
XDG_GREETER_DATA_DIR
LC_MONETARY
CLUTTER_IM_MODULE
SESSION
GPG_AGENT_INFO
XDG_MENU_PREFIX
TERM
SHELL
QT_LINUX_ACCESSIBILITY_ALWAYS_ON
WINDOWID
LC_NUMERIC
UPSTART_SESSION
GNOME_KEYRING_CONTROL
GTK_MODULES
USER
LS_COLORS
QT_ACCESSIBILITY
LC_TELEPHONE
XDG_SESSION_PATH
UNITY_HAS_3D_SUPPORT
XDG_SEAT_PATH
SSH_AUTH_SOCK
SESSION_MANAGER
DEFAULTS_PATH
XDG_CONFIG_DIRS
UNITY_DEFAULT_PROFILE
PATH
DESKTOP_SESSION
QT_QPA_PLATFORMTHEME
QT_IM_MODULE
LC_IDENTIFICATION
__fish_sysconfdir
XDG_SESSION_TYPE
PWD
JOB
XMODIFIERS
__fish_datadir
LANG
GNOME_KEYRING_PID
MANDATORY_PATH
GDM_LANG
LC_MEASUREMENT
IM_CONFIG_PHASE
COMPIZ_CONFIG_PROFILE
PAPERSIZE
GDMSESSION
SESSIONTYPE
GTK2_MODULES
XDG_SEAT
SHLVL
HOME
LANGUAGE
GNOME_DESKTOP_SESSION_ID
UPSTART_INSTANCE
__fish_help_dir
XDG_SESSION_DESKTOP
UPSTART_EVENTS
LOGNAME
COMPIZ_BIN_PATH
XDG_DATA_DIRS
QT4_IM_MODULE
DBUS_SESSION_BUS_ADDRESS
LESSOPEN
UPSTART_JOB
INSTANCE
XDG_RUNTIME_DIR
DISPLAY
XDG_CURRENT_DESKTOP
GTK_IM_MODULE
LESSCLOSE
LC_TIME
__fish_bin_dir
XAUTHORITY
LC_NAME
COLORTERM
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/mim/bin:/home/mim/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/mim/.npm-global/bin
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/home/mim
The text was updated successfully, but these errors were encountered: