pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Upper constraints do not exclude prerelease (alpha/rc) versions of next higher version

Open corneliusroemer opened this issue 1 year ago • 4 comments

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

corneliusroemer avatar Jul 04 '24 00:07 corneliusroemer

@baszalmstra do you think this would be correct to always add? Or is there some other logic we could benefit from?

ruben-arts avatar Jul 09 '24 05:07 ruben-arts

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.

corneliusroemer avatar Jul 09 '24 12:07 corneliusroemer

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.

baszalmstra avatar Jul 09 '24 14:07 baszalmstra

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

ytausch avatar Oct 20 '25 08:10 ytausch