Upper constraints do not exclude prerelease (alpha/rc) versions of next higher version
Checks
-
[X] I have checked that this issue has not already been reported.
-
[X] I have confirmed this bug exists on the latest version of pixi, using
pixi --version.
Reproducible example
pixi add cowpy
cat pixi.toml
Issue description
Upper version constraints do not exclude prereleases
Expected behavior
Expected: Prerelease versions are excluded as well in automatic upper constraints. This is what conda forge does
cowpy = ">=1.1.5,<1.2a0"
Actual:
cowpy = ">=1.1.5,<1.2"
Compare to the pins of conda recipes:
- libzlib >=1.2.13,<2.0.0a0
@baszalmstra do you think this would be correct to always add? Or is there some other logic we could benefit from?
Just for context: I'm not very sure about how rc versions are used by pip and conda, so this is more of a "potential issue" than a confirmed one. It might also be fine as is, but good to confirm, I think.
Yeah I think it would be more correct to add it. Its just reaaally ugly. I know @wolfv added this behavior in rattler-build as well.
We could also reevaluate using the ~ operator. That also doesnt include prereleases.
I've also come across this issue.
Its just reaaally ugly.
I could imagine this feeling comes from alpha releases not being common on conda-forge. However, this is highly relevant for private channels, where <1.2 or similar is not the correct default.
We could also reevaluate using the ~ operator.
It seems to be discouraged: https://github.com/jaimergp/ceps/blob/43ce1927a56a39f7f4da5aa0b426481df29a032d/cep-9999.md?plain=1#L110