Synopsys:
With python dagger v0.18.4 removing the uv.lock file from a dagger module breaks the module and python SDK install step.
How to reproduce it:
mkdir test
cd test
dagger init --sdk=python
# don't fail
dagger call container-echo --string-arg=teststr
mv uv.lock _uv.lock
# fails
dagger call container-echo --string-arg=teststr
The last shell command returns the error: The package testrequiresdagger-io==0.18.4, but 0.0.0 is installed
From what I've analyzed the following changes in this PR are the reason for this behavior.
As far as I understand this is what's going on:
- The dagger python SDK identifies that there is a
pyproject.tomlfile and marks it as initialized. Later it modifies thepyproject.tomlby changingdagger-iofordagger-io ==0.18.4 - The dagger python SDK installs the python
dagger-iomodule and the project dependencies withuv pip install -e ./sdk -e .. The dagger-io sdk is installed from a directory so it's installed with the fallback version0.0.0 - The dagger python SDK runs
uv pip checkand fails because thepyproject.tomlstates that needsdagger-io ==0.18.4, but it hasdagger ==0.0.0installed