-
Notifications
You must be signed in to change notification settings - Fork 9
"transitive-package-only-prereleases-in-range" doesn't follow the spec #171
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
Comments
The exact meaning of this paragraph is hard to interpret because it was written before backtracking resolver were a thing in python and the main concern was backwards compat to pre-PEP 440 versions. From Donald Stufft:
From a user perspective, i think the current behaviour makes sense, at least in uv i wouldn't want to fix it. (Not to say that uv's prerelease behaviour doesn't need it improving) |
Yes, I started that thread, and I don't think it's relevant here because no backtracking is occuring. This is a direct application of the specifier to the versions available, I don't believe there is any ambiguity. Users also seem happy with poetry's behavior, and it complies with the spec here. I will say, pip maintainers have said it's not required because of the word SHOULD, but I assume packse doesn't want to add scenarios that contradict the SHOULDs in the spec. |
This is a more fundamental issue with packse's current scenarios, that they are aligned closely with uv's design goals and not the actual spec. I think for other tools to adopt packse there should be a clear seperation of spec scenarios, the enforcement level of the spec, and design scenarios, perhaps by including a flag. But if that isn't itself a design goal of packse, I understand. I think discussion on that would require it's own issue, I don't think leaving this issue open is helpful. |
The scanrio is the following currently:
In short, the idea is because a prerelease requirement is not opted into then even though a prerelease version is available it is not selected.
However, this is explictly again the following line in the spec (https://packaging.python.org/en/latest/specifications/version-specifiers/#handling-of-pre-releases):
In this case there is no final or post release that satisfies the version specifier, and therefore the dependency resolution SHOULD accept the removetely available pre-release.
Currently neither uv nor pip follow the spec here, pip needs an overhaul on prereleases and uv has deicded not to follow the spec due to design choices, but poetry does follow the spec and does find this satisfiable.
If packse is attempting to follow the spec, and not be a catalogue of uv's design choices, this should be set to
"satisfiable": true
and uv should mark this as XFAIL. I'll be happy to make a PR.The text was updated successfully, but these errors were encountered: