-
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
Breaking change in handling of some version constraints from poetry-core
1.0.0
to 1.1.0
#6519
Comments
feels like a bug in Version.next_breaking() to me. I guess it's correct that If you care enough to put together a fix: suggest that And add a testcase in here - |
though fwiw |
👋 Just adding on top of this, |
should be straightforward to fix and test, see my comment a couple up if this is important to you |
@dimbleby Looking at the PR, is that really the problem ? The issue I had was: We have a package with
which seems fine since On
I believe that the correct upper limit after a prerelease is the release itself which is |
I just tried it and poetry successfully resolves Please provide a repro of whatever your problem is! |
Are you reporting that when you try to
it seems to me that pip is wrong and poetry is right here:
so if that is what you are talking about, I'd suggest taking it to the pip issue tracker for an opinion |
although I could imagine that poetry was supposed to normalize the version before writing it edit: that doesn't help, you still get
so this really does want taking to pip IMO |
hmm, beginning to change my mind... PEP440 says "The exclusive ordered comparison <V MUST NOT allow a pre-release of the specified version unless the specified version is itself a pre-release" So "<0.0.2" does indeed exclude all those prereleases... possibly the bottom line here is that no-one really knows what "^0.0.2a21" is supposed to mean, the caret notation is a thing that poetry introduces and so this is a problem of its own making. python-poetry/poetry-core#475 seems like the right answer |
Alright! But if you want to replicate the issue, here's where to start:
From that state, you need another
|
yep, I think we're all on the same page now. If you can get python-poetry/poetry-core#475 over the line everything should be good |
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).Issue
I ran into an interesting bug (I'm not sure if it's the root cause of some other issues, I had trouble finding a matching issue) where when poetry was using
poetry-core==1.0.0
it was correctly resolving the version constraint of a somewhat non-standard semver version, but once poetry started using versionpoetry-core==1.1.0
, it's no longer correctly resolving the same version constraint, resulting in dependency resolution issues because the resolved constraint is never satisfiable.For more context, in my current project, I'm pulling in a library:
Where the next available version is
0.33b0
.In a version of poetry that uses
poetry-core==1.0.0
, it correctly resolves this constraint:This will output
>=0.32b0,<0.33
, which is what ultimately ends up insetup.py
when publishing with poetry.Now, using
poetry-core==1.1.0
:This will output
0.32
, which ultimately will get translated to a constraint that's unsolvable>=0.32b0,<0.32
insetup.py
:Ultimately, after upgrading to
poetry
version1.2.0
and publishing my package, it could no longer be installed because this version constraint could no longer be satisfied, resulting in a breaking change. I've worked around this for now by specifying an explicit version constraint, but, wanted to see if this is something that anyone else has noticed, if this is a "won't fix" type situation, since the version is somewhat non-standard, etc.The text was updated successfully, but these errors were encountered: