Skip to content

tox-uv fails at uv sync when system uv is older than minimal required version #239

@ssbarnea

Description

@ssbarnea

Issue

I recently observed that if you add a minimal version of uv like below and run tox on a system that has an over uv installed it will fail to sync due to uv being older than minimal required.

Environment

# pyproject.toml
[tool.uv]
required-version = ">=0.8.13"

Output of running tox

Output of tox -rvv
Run tox -e py310-lint
ROOT: will run in automatically provisioned tox, host /opt/hostedtoolcache/Python/3.10.18/x64/bin/python3 is missing [requires (has)]: tox-extra>=2.1
ROOT: freeze> /opt/hostedtoolcache/Python/3.10.18/x64/bin/uv --color never pip freeze
ROOT: bindep==2.13.0,cachetools==6.2.0,chardet==5.2.0,colorama==0.4.6,distlib==0.4.0,distro==1.9.0,filelock==3.19.1,gitdb==4.0.12,gitpython==3.1.45,packaging==25.0,parsley==1.3,pbr==7.0.1,pip==25.2,platformdirs==4.3.8,pluggy==1.6.0,pyproject-api==1.9.1,setuptools==80.9.0,smmap==5.0.2,tomli==2.2.1,tox==4.28.4,tox-extra==2.2.0,tox-uv==1.28.0,typing-extensions==4.15.0,uv==0.8.13,virtualenv==20.34.0
ROOT: provision> .tox/.tox/bin/python -m tox -e py310-lint
py310-lint: uv-sync> uv sync --locked --python-preference system -p /home/runner/work/mk/mk/.tox/.tox/bin/python
error: Required uv version `>=0.8.13` does not match the running version `0.8.8`. Update `uv` by running `uv self update`.
py310-lint: exit 2 (0.01 seconds) /home/runner/work/mk/mk> uv sync --locked --python-preference system -p /home/runner/work/mk/mk/.tox/.tox/bin/python pid=3883

Seen at https://github.com/pycontribs/mk/actions/runs/17232944097/job/48891086328?pr=392

PS. I am working on it, filed here only for sharing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions