Repository navigation
Lockfile loses the Python a pipx tool selects after mise use/up or a filtered mise lock #14787
Unanswered
AllDmeat
asked this question in
Troubleshooting and bug reports
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
With per-tool Python for PyPI tools (#14479),
mise lockwrites the selected Python next to the project's python. Several commands that rewritemise.lockafterwards drop one of the two entries, andmise install --lockedthen fails.Verified on mise 2026.10.15, macOS arm64.
Repro
1.
mise use/mise updrop the selected PythonA full
mise lockrestores the entry.2. A filtered
mise lockdrops the other python entryStarting from the full lockfile:
mise lock pipx:yamllintkeeps 3.14.8 and drops 3.15.0.mise lock pythonkeeps 3.15.0 and drops 3.14.8.mise lock jqkeeps both.Expected: these commands keep the lock entries of the tools they don't change, and
mise install --lockedkeeps working.Cause
From reading the source:
update_lockfilesinsrc/lockfile.rsbuilds the python entries from the toolset and the newly installed versions. The selected Python is a private runtime and never appears there, becauseinstall_all_versionsdoesn't return private runtimes. The merge replaces all python entries, so the selected one is lost. Onlymise lockadds it back, inadd_selected_python_locks.prune_stale_versionsinsrc/cli/lock.rsprunes every tool short in the run, including the python thatadd_selected_python_locksadded forpipx:yamllint, which the user didn't name. Inmise lock python, the filtered list has no pipx tools, so the selected Python is never resolved and gets pruned.I'll open a PR that keeps the selected Python entries in
update_lockfilesand limits a filteredmise lockto pruning the tools it names, plus the selected Pythons whenpythonis named.This report was generated by an AI coding assistant (Claude Code, model Claude Opus 5.5). The repro was run on the version stated above.
All reactions