Stop the pipx virtualenvs depending on the system Python #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "pin-uv-managed-python"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes the cause behind DWA-71 for this repository. One line in
[env].What broke
ansible-core,ansible-lintandyamllintall failed on river withModuleNotFoundError, somise run lintcould not pass in any role or playbook repository.The tools are uv virtualenvs, and uv had built them against
/usr/bin/python3:pyvenv.cfghome = /usr/bin,version_info = 3.12.3lib/python3.12/site-packages/usr/bin/python3todaypython3.12is gone3.14 looks in
lib/python3.14/site-packages, finds nothing, and every entry point imports nothing. The binaries were intact the whole time, which is why it read as a broken install rather than a moved interpreter.The fix
uv then downloads and owns the interpreter, and an OS upgrade cannot orphan it.
Verified in both directions
The part worth checking was whether mise passes the variable through to a tool install at all, so I tested the inverse:
pyvenv.cfghomeonly-system/usr/bin(3.14.4)only-managed~/.local/share/uv/python/cpython-3.13-…It does. Afterwards
mise run lintpasses at the production profile here, and the same rebuilt tools make it pass inansible_role_monitoring,ansible_role_node_exporter,ansible_playbook_baselineandansible_playbook_flatcar.What did not work
Pinning
pythonin[tools]— the obvious first attempt. mise installs that Python, and uv ignores it and picks its own anyway. It would have been misleading config with a comment claiming something untrue, so it is not in this PR.Still to do elsewhere
The same line belongs in the other eight repositories, since this tooling is duplicated by design. Tracked in DWA-71 rather than done here, so each repo's change is reviewable on its own.
44ed466c82to448653c4ba