-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Poetry 1.2+ incorrectly appears to validate 'platform_release' markers against PEP 440 #7418
Comments
https://github.com/python-poetry/poetry-core/blob/14f98fbb750fffcc8a232803cefe39c9a351bf47/src/poetry/core/version/markers.py#L178-L182, if you care to put together a merge request |
Yes, I found that snippet! The problem I saw was that there are actually tests on specifically this element being depended on as a version and supporting version constraints, and my assumption is that if I remove it from the version_like list, these tests will break. |
it's possible however that it was just based on the author of the test picking any of the 3 as a 'version like marker'. do you have context? |
I expect it's a deliberate test but - you are telling us - of wrong behaviour. The PEP should be the final arbiter. |
I have the same issue with these markers:
This prevents from upgrading from Poetry 1.1.15. |
I'm experiencing this issue with a very similar example for torch |
Adding another case here: I am experiencing this issue with a wheel that I am building ( pydsstools = [
{ version = "^2.3", markers = "sys_platform == 'win32'" },
{ file = "lib/pydsstools-3.2.1.gd65443b.dirty-cp38-cp38-linux_x86_64.whl", markers = "python_version == '3.8' and sys_platform == 'linux'" },
{ file = "lib/pydsstools-3.2.1.gd65443b.dirty-cp39-cp39-linux_x86_64.whl", markers = "python_version == '3.9' and sys_platform == 'linux'" },
{ file = "lib/pydsstools-3.2.1.gd65443b.dirty-cp310-cp310-linux_x86_64.whl", markers = "python_version == '3.10' and sys_platform == 'linux'" },
] Note that I am using poetry to build this wheel $ poetry add --dry-run lib/amzi_pyras_lib-0.0.1-py3-none-any.whl
Could not parse version constraint: 3.2.1.gd65443b.dirty
1) I just realized that nox runs |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
-vvv
option) and have included the output below.Issue
We have a package with a marker on a platform_constraint. I'm not fully spun up on what it's doing, but I think it's downloading different versions of a dependency depending on which embedded platform Poetry is being run on.
I believe that this is a regression between Poetry 1.1.15 and Poetry 1.2 because Poetry 1.2 stopped supporting Python 3.6 and this project was stuck on that until recently.
The constraint looks something like:
What I'm seeing is that PEP440 constraint validation is failing on the platform_release, and clearly that's not a valid PEP440 constraint. It's also not meant to be, though - PEP508 describes that a platform_release might be something like
3.14.1-x86_64-linode39
. From my read of the code, I have a hunch that... platform_releases are considered to be 'version like' because they could be of the form 13.0 or the like, and at some point, someone started validating version like constraints against PEP 440. But I'm not familiar with this codebase so it's just a hunch.The text was updated successfully, but these errors were encountered: