-
-
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
Pipenv silently ignores dependency when python_full_version is specified and release candidate python is used #5835
Comments
@bjorn-verstrepen If possible, please check this against: #5793 |
@bjorn-verstrepen Actually nevermind, I just cut a new release with that branch I referenced -- if you could check |
Hi @matteius, thanks for the follow up, I'll be able to check it tomorrow afternoon. I'll let you know the result! |
Hi @matteius, sorry for the delay, I'm running PipEnv 2023.9.8 now and the issue is still there.
|
Hmmm, well this actually seems like possibly a pip bug, but with my proposal in #5935 would allow you to specify the target python version and system (basically anything in the platform dictionary) to have the resolver target that information as an override. I would be curious to hear your thoughts if you have a chance to try it out. |
I'd be willing to try it out but I'm not quite sure how to use that override. |
Ah sorry, I had linked the wrong PR: #5931 You would add a section to the Pipfile named resolver, example:
This is a minimal patch, so it doesn't provide a way to target multiple versions -- I went down that path initially but it involves changes in the packaging markers code, and it got too complicated for a first pass. |
Unfortunately still the same issue.
|
I have the same issue ( |
It seems that setting markers in |
The problem with my branch is that I suspect the lock file was adjusted correctly based on the overrides, but during install the markers get evaluated again against the actual python version/platform information. I think this may actually be a bug with how packaging (which pip vendors, and we vendor pip) handles evaluating the markers when a release candidate python is used. |
Assuming this is still just a known issue? Having a bunch of problems w/ ignored packages due to the Python 3.11.0rc1 version on ubuntu22.04. |
Pipenv Issue #5835 Analysis and Proposed Resolution1. Problem Summary: Pipenv silently ignores dependencies whose "python_full_version" markers don't match the current Python interpreter when using a release candidate (RC) version of Python. Specifically, 2. Comment Analysis:
3. Proposed Resolution: The issue stems from Pipenv using the string representation of Code Changes: Instead of using the raw string from
4. Code Snippet (in @cached_property
def python_version(self) -> str | None:
with self.activated() as active:
if active:
from pipenv.patched.pip._vendor.packaging.version import Version
version_str = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}" # Extract version parts
python_version = Version(version_str) # Create PEP 440 compliant version
return str(python_version) # Return the string representation
else:
return None 5. Additional Steps:
Overall, the proposed solution aims to align Pipenv's marker evaluation with PEP 440, ensuring consistent and expected behavior with RC Python versions. |
Would be great if someone could check out the behavior of #6278 against this issue. |
Issue description
When installing
Flask-Limiter==2.6.2
on python 3.11.0rc1, the Pipenv installer silently ignores packagerich
as it would not match the environment.Note that python3.11.0rc1 is the default python 3.11 version for ubuntu 22.04 (jammy-updates) right now.
Expected result
As python 3.11.0rc1 seems to fall within the specified range of
python_full_version >= "3.6.3" and python_full_version < "4.0.0"
I would expect it to install rich without an issue.Actual result
pipenv -v install Flask-Limiter==2.6.2 --verbose
Steps to replicate
Make sure python 3.11.0rc1 is installed and run
pipenv -v install Flask-Limiter==2.6.2 --verbose
.$ pipenv --support
Pipenv version:
'2023.7.23'
Pipenv location:
'/home/bjorn/.local/lib/python3.11/site-packages/pipenv'
Python location:
'/usr/bin/python3.11'
OS Name:
'posix'
User pip version:
'23.2.1'
user Python installations found:
PEP 508 Information:
System environment variables:
USER
PAM_KWALLET5_LOGIN
LC_TIME
XDG_SEAT
XDG_SESSION_TYPE
SSH_AGENT_PID
SHLVL
HOME
DESKTOP_SESSION
XDG_SEAT_PATH
LC_MONETARY
DBUS_SESSION_BUS_ADDRESS
LIBVIRT_DEFAULT_URI
MANDATORY_PATH
LOGNAME
XDG_SESSION_CLASS
DEFAULTS_PATH
XDG_SESSION_ID
PATH
XDG_SESSION_PATH
LC_ADDRESS
XDG_RUNTIME_DIR
DISPLAY
LANG
XDG_CURRENT_DESKTOP
LC_TELEPHONE
XDG_SESSION_DESKTOP
XAUTHORITY
SSH_AUTH_SOCK
SHELL
LC_NAME
QT_ACCESSIBILITY
LC_MEASUREMENT
GPG_AGENT_INFO
LC_IDENTIFICATION
XDG_VTNR
PWD
XDG_CONFIG_DIRS
XDG_DATA_DIRS
LC_NUMERIC
LC_PAPER
QT_SCREEN_SCALE_FACTORS
QT_AUTO_SCREEN_SCALE_FACTOR
KDE_FULL_SESSION
KDE_SESSION_VERSION
KDE_SESSION_UID
KDE_APPLICATIONS_AS_SCOPE
IM_CONFIG_PHASE
SYSTEMD_EXEC_PID
XCURSOR_THEME
XCURSOR_SIZE
GTK_RC_FILES
GTK2_RC_FILES
SESSION_MANAGER
CHROME_DESKTOP
ORIGINAL_XDG_CURRENT_DESKTOP
GDK_BACKEND
LS_COLORS
LESSCLOSE
LESSOPEN
_
TERM_PROGRAM
TERM_PROGRAM_VERSION
COLORTERM
GIT_ASKPASS
VSCODE_GIT_ASKPASS_NODE
VSCODE_GIT_ASKPASS_EXTRA_ARGS
VSCODE_GIT_ASKPASS_MAIN
VSCODE_GIT_IPC_HANDLE
VSCODE_INJECTION
ZDOTDIR
USER_ZDOTDIR
TERM
OLDPWD
P9K_TTY
_P9K_TTY
ZSH
PAGER
LESS
LSCOLORS
VIRTUAL_ENV_DISABLE_PROMPT
P9K_SSH
LESS_TERMCAP_mb
LESS_TERMCAP_md
LESS_TERMCAP_me
LESS_TERMCAP_se
LESS_TERMCAP_so
LESS_TERMCAP_ue
LESS_TERMCAP_us
LS_OPTIONS
PYTHONDONTWRITEBYTECODE
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/bjorn/.local/bin:/home/bjorn/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/bjorn/.cabal/bin:/home/bjorn/.ghcup/bin
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/home/bjorn/Programming/Python/test/pipenv-test-1
Contents of
Pipfile
('/home/bjorn/Programming/Python/test/pipenv-test-1/Pipfile'):Contents of
Pipfile.lock
('/home/bjorn/Programming/Python/test/pipenv-test-1/Pipfile.lock'):The text was updated successfully, but these errors were encountered: