-
-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Issue
Due to the hardcoded --locked option added when uv-venv-lock-runner is used, we are unable to add optionals like:
uv_sync_flags = --upgrade
Also attempts to include multiple flags, will break because the command line is not correctly split:
uv_sync_flags = --upgrade --prerelease=allow
Output of running tox
Output of tox -rvv
lower: uv-sync> uv sync --locked --python-preference system --extra test --upgrade --prerelease=allow -p /Users/ssbarnea/code/os/mk/.tox/.tox/bin/python
error: the argument '--locked' cannot be used with '--upgrade'
lower: uv-sync> uv sync --locked --python-preference system --extra test '--upgrade --prerelease=allow' -p /Users/ssbarnea/code/os/mk/.tox/.tox/bin/python
error: unexpected argument '--upgrade --prerelease' found
tip: a similar argument exists: '--upgrade'
Usage: uv sync --locked --extra <EXTRA> --upgradeNote that I using the uv-venv-runner instead is not really a valid alternative as that would no longer make use of sync feature at all.
I encounter this while trying to configure a special tox environment that is supposed not to use the lock file and install newer dependencies (the other ones would use the lock).
@gaborbernat I am not sure what is the correct way to address this one, maybe you have some ideas. Searching inside uv_sync_flags for incompatible options in order to remove them from the the sync command seems like a not so future proof solution. Maybe adding an option uv_sync_locked = false that would remove the incompatible flag?