-
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
Version Strings Lexically Sorting so 2.2.0 < 2.2.0rc1 #8794
Comments
Could you remove your cache ( |
That's probably nothing about the cache but about Python version specifier quirks. The relevant parts of the log:
We find 2 packages ( We'd probably need a way to distinguish between Python version specifiers |
@radoering I think you have nailed it. I did not know that specific detail of exclusive ordered comparisons. This is not a Poetry problem but a user error (my error) in not understanding the details of python version specifiers. I'm going to close it. |
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. |
Poetry version: Poetry (version 1.7.1)
Python version: 3.9.18
OS version and name: MacOS Sonoma 14.2
pyproject.toml: https://gist.github.com/medley56/8aa8cfa915b2378f9810085055bceb5b
I am on the latest stable Poetry version, installed using a recommended method.
I have searched the issues of this repo and believe that this is not a duplicate.
I have consulted the FAQ and blog for any relevant entries or release notes.
If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option) and have included the output below.Issue
Attached at the bottom is the entire output of
poetry lock -vvv
. The relevant portion is this:Our dependency spec for the
libera_utils
library is:libera-utils = {version="^2.2.0rc4", allow-prereleases=true}
If you check PyPI, you will see that
2.2.0rc4
and2.2.0
are both real versions of thelibera_utils
library. In Python versioning, one would expect2.2.0
to be greater than2.2.0rc4
. However, it looks like Poetry is lexically sorting these versions, which works just fine as long as you aren't making the exact comparison I'm making here. I want to use the RC version but Poetry appears to reject it for being greater than 2.2.0.It occurs to me that perhaps this behavior is by design. I'm not intimately familiar with the semantic versioning spec for PyPI but I would believe it if the rc syntax is actually a perversion of the specification. If that (or something similar) is the case, then I simply suggest adding a paragraph to the Poetry docs on the Dependency Specification section. I grepped through there but didn't find any mention of the rc suffix format for PyPI versions.
Lastly, if you have a recommendation on a better way to manage release candidate versions that plays better with Poetry, please guide me.
poetry-lock-vvv.log
The text was updated successfully, but these errors were encountered: