Can't install packages from branches using pypi
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
[project]
channels = ["conda-forge"]
description = "Add a short description here"
name = "test"
platforms = ["linux-64"]
[dependencies]
python = ">=3.12,<3.13"
[pypi-dependencies]
urllib3 = { git = "https://github.com/urllib3/urllib3.git", rev="1.26.x" }
Error:
Error:
× Found invalid characters for git revision '1.26.x', branches and tags are not supported yet
╭─[pixi.toml:11:66]
10 │ [pypi-dependencies]
11 │ urllib3 = { git = "https://github.com/urllib3/urllib3.git", rev="1.26.x" }
· ──────
╰────
Issue description
In previous versions, when using pypi-dependencies setting a branch in the rev field allowed the user to install from a branch instead of having to use the sha code. In the new version 0.40.0 this does not work.
Expected behavior
Either work as before or explain in the changelog that branches and tags are not supported in the rev field now.
It would be great to know if the feature was accidentally removed or if it was never intended to be in a release. If it's not ready for a full release, perhaps it could be included as a preview? This feature was very helpful for me.
If you make it a branch = "1.26.x" (or tag if it was a tag) it should work like before.
What the error describes is that we know this has never worked properly as it will always resolve the lockfile.
Last Friday, we found out this has to do with the fact that we compare the tag/branch with the rev in the lockfile. Which will never be in sync. We're trying to figure out a proper solution.
Fixed by : https://github.com/prefix-dev/pixi/pull/2960
You could now specify branch, tag or rev in the pixi.toml.
Let me know if you still hit some problems with it!