-
Notifications
You must be signed in to change notification settings - Fork 251
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
marker evaluation should allow prerelease versions #522
Comments
The PEPs don't directly address this. PEP 508 for environment markers says that PEP 440 is followed for comparisons. PEP 440 for pre-releases has a concept of "already installed" (which we just got fixed for #505 and is not out yet). We could probably interpret the Python version as "installed" in this instance. @pradyunsg or @uranusjr are usually the marker experts. 😁 |
I think this is a bug, and allowing pre-releases here seems like a reasonable thing to do. |
This prevents bugs due to pypa/packaging#522. Fixes #3447.
This prevents bugs due to pypa/packaging#522. Fixes #3447.
Think it's still a valid bug, see: pypa/pipenv#5972 (comment) tl;td; I get errors like this:
with Python
It happens with current pip version 23.2.1 |
IIUC, pipenv maintains their own fork of pip. I suggest that you try and get a confirmation from the maintainers there about the source of the issue before reaching out here / to pip. If it's indeed a bug, I'd appreciate it if you could file a new issue for it and include a reproducer using just packaging to describe the behaviour you see vs what you expect to see. |
FWIW, pipenv's version of packaging is unmodified comes from pip's _vendor packaging, and where I believe the issue happens is in 7-8 year old code, if the version being compared doesn't end in a number, the comparison fails, which is what I believe this original issue report was about: https://github.com/pypa/pip/blame/main/src/pip/_vendor/packaging/markers.py#L189-L201 |
Ah, so this is #678. |
considering the requirement
black==22.1.0; python_full_version >= "3.6.2"
I would expect pip to install black on python 3.11.0a5 however I get:looking at
packaging.markers
"python_full_version > '3.6.2' is excluding pre-release versions:see also pypa/pip#10962 (comment)
The text was updated successfully, but these errors were encountered: