Skip to content

Stop mise from managing Python globally - #11435

Open
Michallote wants to merge 8 commits into
omacom:quattrofrom
Michallote:fix-python-mise-install
Open

Michallote wants to merge 8 commits into
omacom:quattrofrom
Michallote:fix-python-mise-install

Conversation

@Michallote

@Michallote Michallote commented Sep 12, 2026 •

Copy link
Copy Markdown

Closes

Problem

omarchy-install-dev-env python ran mise use --global python@latest, which puts mise's python/pip shims ahead of the distro-packaged Python in every shell. Anything that expects the system interpreter — AUR/yay builds in particular — breaks.

Fix

  • omarchy-install-dev-env python installs only uv (through mise, as upstream does) and sets no global mise Python.
  • The Install → Python menu guard keys on ~/.local/share/mise/installs/uv, the same way Node's keys on installs/node.
  • omarchy-remove-dev-env python and its menu guard are unchanged: removal still uninstalls mise Python and keeps uv.
  • The migration drops an existing global mise Python pin with --no-prune, so installed interpreters stay.

The migration removes only the global pin, not the installed interpreters. Pruning them would delete versions a project's own .mise.toml still pins to, which is a legitimate, non-conflicting use of mise. Dropping the pin with --no-prune leaves project-local mise Python untouched.

Fixes #9158

mise's global Python pin shims python/pip ahead of the distro-packaged
Python for every shell, which conflicts with tools that expect the
system Python. omarchy-install-dev-env python now only installs uv;
a migration drops the global mise pin on machines that already set
it, without touching any project-local mise Python.
@csfh

csfh commented Sep 13, 2026

Copy link
Copy Markdown
Member

Doesn't this force Arch python on everyone by default?

We want mise to handle and manage python.

Maybe a different fix is to scope AUR and other commands that break to only see the system distribution python?

@Michallote

Copy link
Copy Markdown
Author

Doesn't this force Arch python on everyone by default?

Hi @csfh , python IS forced on everyone by default, even if you don't install it yourself almost all linux distros ship python. Part of the OS itself use python, or it wouldn't be shipped at all by default. Overriding system python is a bad bad idea for many reasons. (the issues have discussions in length if you wanna take a look).

The TLDR is, never override global python, always use virtual environments (.venv), and uv is the much better python package manager, Omarchy already installs it in the menu.

We want mise to handle and manage python.

Maybe a different fix is to scope AUR and other commands that break to only see the system distribution python?

We don't want mise to manage global python. Most linux distributions package and ship python, which several programs rely on. Allowing mise to manage python is basically overriding the python binary in PATH for all applications.

Quoting myself from one of the issues:

This has been a long standing issue with python installations. System wide installations are flagged externaly managed installation for this very reason. See https://peps.python.org/pep-0668/

Whenever you try to do modifications to base python through any package manager you get a big red sign telling you this is a bad idea or the package manager outright refuses. For instance:

~ ✗ uv pip install numpy --system
Using Python 3.14.7 environment at: /usr
error: The interpreter at /usr is externally managed, and indicates the following:

  To install Python packages system-wide, try 'pacman -S
  python-xyz', where xyz is the package you are trying to
  install.

  If you wish to install a non-Arch-packaged Python package,
  create a virtual environment using 'python -m venv path/to/venv'.
  Then use path/to/venv/bin/python and path/to/venv/bin/pip.

  If you wish to install a non-Arch packaged Python application,
  it may be easiest to use 'pipx install xyz', which will manage a
  virtual environment for you. Make sure you have python-pipx
  installed via pacman.

hint: Virtual environments were not considered due to the `--system` flag

However mise overrides the whole python binary, not even a single warning is emitted. And stuff breaks.

As I mentioned in the issues before, this not just breaks the AUR, but breaks several applications themselves. Including extensions for nautilus and gnome applications that rely on python.

Python for a long time has recommended against managing and installing libraries globally. The recommended way-of-work is always, ALWAYS to use virtual environments for any app you are developing or bundling. Either via python -m venv .venv., uv venv, uv init etc.

You can still use mise, but the end result is you should always make a virtual environment, for which uv is a far superior tool.

@csfh

csfh commented Sep 14, 2026

Copy link
Copy Markdown
Member

@dhh @ryanrhughes

I think this would require some rethinking of how we integrate mise stubs with Omarchy to make a clean UX for using virtual environments and Mise together.

Any idea what direction you want here?

@jdx

jdx commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

I double-checked this, and @Michallote is right about the underlying failure mode. Arch’s own Python packaging guidelines invoke python from PATH while expecting the distro interpreter and its Pacman-installed modules. Some packaged applications also use #!/usr/bin/env python, so globally selecting a different Python can break both package builds and installed applications.

This explains why the behavior may not have caused the same problems elsewhere. Debian and Ubuntu generally install distro-provided Python programs with an absolute #!/usr/bin/python3 shebang, deliberately insulating them from virtual environments and version managers earlier in PATH. In that environment, mise can globally select a development Python without replacing the interpreter used by packaged applications. Arch packages do not consistently maintain that boundary.

I think Omarchy should keep activating mise shims in the desktop environment—that is important for GUI coding agents and other graphical development tools to resolve project-local tool versions. The problematic part is specifically mise use --global python@latest, not desktop activation or mise’s normal behavior.

To be clear, I don't think this is a bug or anything that could be "fixed" with mise.

Outside projects, the Python shim will still be resolved, but would fall through to Arch’s /usr/bin/python; inside projects, local mise configuration would select the requested version.
So removing the global pin looks right. Keeping desktop-wide mise shims would preserve the coding-agent UX.

@csfh csfh added the verified Omarchy Triage has verified that this issue is ready for final review label Sep 14, 2026
@csfh

csfh commented Sep 14, 2026

Copy link
Copy Markdown
Member

@dhh Ready for review.

Comment thread bin/omarchy-install-dev-env Resolved
Comment thread bin/omarchy-remove-dev-env Resolved
@Michallote

Copy link
Copy Markdown
Author

Hi @jdx , thank you for looking into it.

I initially explored flags in mise to try and find a solution that didn't involve removing it altogether (making the smallest possible fix that fits with the rest of the installers), and one of the options I explored was to have only the --global flag removed.

However it still shadows python in an impactful way:

~ ❯ mise install python@latest
mise hint use multiple versions simultaneously with mise use python@3.12 python@3.11
mise hint installing precompiled python from astral-sh/python-build-standalone
if you experience issues with this python (e.g.: running poetry), switch to python-build by running mise settings python.compile=1
python@3.14.7   Python 3.14.7                                                                      
mise WARN  python installed but not activated — it is not in any config file.
To install and activate, run:
  mise use python

~ ❯ which python
/home/michallote/.local/share/mise/shims/python

And even if we install a single particular option for example python@3.12 it still is not usable although it IS in the path.

~ ❯ mise install python@3.12
python@3.12.14  Python 3.12.14                                                                     
mise WARN  python installed but not activated — it is not in any config file.
To install and activate, run:
  mise use python

~ ❯ which python3.12
/home/michallote/.local/share/mise/shims/python3.12

~ ❯ python3.12
mise ERROR No version is set for shim: python3.12
Set a global default version with one of the following:
mise use -g python@3.12.14
mise ERROR Version: 2026.9.1 linux-x64 (2026-09-02)
mise ERROR Run with --verbose or MISE_VERBOSE=1 for more information

Compare this with uv behaviour for instance:

~ ❯ uv python install python3.12
Installed Python 3.12.14 in 22ms
 + cpython-3.12.14-linux-x86_64-gnu (python3.12)

~ ❯ which python
/usr/bin/python

~ ❯ which python3.12
/home/michallote/.local/bin/python3.12

~ ❯ python3.12
Python 3.12.14 (main, Aug 14 2026, 15:34:45) [Clang 22.1.3 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 

It never overshadows system python, and python3.12 is still reachable. Still I hope it is clear by now that serious python development should always use virtual environments. I can't stress this enough, it is not worth it to break anything to preserve this method of python management or installations. At least that is my take.

Outside projects, the Python shim will still be resolved, but would fall through to Arch’s /usr/bin/python; inside projects, local mise configuration would select the requested version. So removing the global pin looks right. Keeping desktop-wide mise shims would preserve the coding-agent UX.

This last comment I didn't quite understand, do you mean that projects with a .mise.toml or some similar mise specific tooling? Like pyproject.toml for poetry and uv?
How do we expect agents in python projects (in Omarchy) to behave currently?

@jdx

jdx commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

a couple of things in the transcript aren't showing what they look like, and I think the install vs use distinction is the root of it.

install ≠ activate

These are three different operations in mise:

  • mise install python@3.12 — downloads the interpreter to ~/.local/share/mise/installs. It does not change what python means anywhere. Purely "have it on disk." It creates shims, but those shims will fall through to system bins if they exist.
  • mise use python@3.12 — writes python = "3.12" into the mise.toml in the current directory. Inside that directory tree, python now means 3.12.
  • mise use -g python@3.12 — writes it into the global config. python means 3.12 everywhere. This is the only one that shadows system python, and it's what omarchy was doing.

A shim isn't a symlink to an interpreter — it's a dispatcher. When you run python, it asks "does any config that applies to this directory select a python?" If yes, it runs that version. If no, it falls through to the next python on PATH, i.e. /usr/bin/python. That fall-through is on by default (not_found_system_fallback).

Mapping to uv, which is closer than it looks:

uv mise
get it on disk, don't touch python uv python install 3.12 mise install python@3.12
make it the global default uv python install --default 3.12 mise use -g python@3.12

Re-reading your two cases

which python → the shim. This doesn't mean system python is shadowed. You never actually ran python in the example. I checked on a clean Arch container (mise 2026.9.9, system python 3.14.7) — with python installed but not in any config:

$ python -c 'import sys; print(sys.executable, sys.version.split()[0])'
/usr/bin/python 3.14.7
$ python3 -c 'import sys; print(sys.executable, sys.version.split()[0])'
/usr/bin/python3 3.14.7

The shim is on PATH and resolves to system python. So with the global pin removed, this case is already fine.

python3.12 erroring. Different cause: Arch ships 3.14 and has no /usr/bin/python3.12, so there was nothing to fall through to. If a python3.12 had existed anywhere on PATH, the shim would have used it — I confirmed this by planting one, including with the shims dir ahead of it. Note your own transcript creates one a few lines later when uv installs it.

The reason a python3.12 shim exists at all is that mise generates shims from what's installed — it can't know which mise.toml somewhere on your disk might select a python, so it creates the shim and resolves at run time. With nothing configured there's nothing to resolve to, hence the error and the mise use -g hint.

On the uv comparison

uv python install --default 3.12 creates python and python3 in ~/.local/bin and shadows system python exactly the same way:

$ uv python install --default 3.12
 + cpython-3.12.14-linux-x86_64-gnu (python, python3)
$ python -V
Python 3.12.14        # /usr/bin/python is still 3.14

The install prefixes are also byte-identical — both mise and uv ship the same python-build-standalone build containing python, python3, and python3.12. The difference is only in what gets published to PATH. So it's not that uv is safe and mise isn't; it's that you used uv's non-default mode and mise's global-default mode.

Your questions

"projects with a .mise.toml or some similar mise specific tooling?" — yes, mise-specific: mise.toml (or .mise.toml, .tool-versions) in the directory or any parent. mise does not read pyproject.toml for the python version. It can read .python-version, but that's opt-in and off by default.

"How do we expect agents in python projects to behave currently?" — with the global pin gone:

  • Outside a mise project: python is /usr/bin/python (3.14, with pacman-installed modules intact). This is the part that matters most on Arch — a global pin to 3.12 silently loses everything in /usr/lib/python3.14/site-packages for any #!/usr/bin/env python script.
  • Inside a project whose mise.toml pins a python: that version, which is the point.
  • Projects using uv/venv: mise isn't involved at all; agents should use uv run or activate the venv.

So removing the pin makes agent behavior match what a plain Arch user gets, which seems like the right default.

Agreed on the PR — dropping the global pin is the correct fix, and keeping mise uninstall out of the migration is right too, since project-local pins are a legitimate use.

@Michallote
Michallote requested review from cemsbr and csfh September 16, 2026 03:20
@jdx

jdx commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

One more thing, since I think there's a legitimate issue buried in here that removing the global pin doesn't address.

Inside a project that pins python, bare python and python3 do become the pinned version. That's correct and it's the entire point of mise — but on Arch it means anything in that tree expecting the distro interpreter gets 3.12 instead of 3.14, and loses everything in /usr/lib/python3.14/site-packages. A PKGBUILD that calls python directly, or a script with #!/usr/bin/env python3, picks up the wrong one.

I think this is minor in practice. I searched through a bunch of packages and ~90% of packages use full shebangs, but it would be an issue for some. Also, the shims have perf overhead which we should avoid anyhow.

So I'm going to add a setting that excludes specific shim names entirely — mise still manages python, it just never creates python/python3/pip shims at all. That gives you uv-without---default semantics: /usr/bin/python is untouched everywhere and never routes through mise, while python3.12 inside a project still resolves to the pinned version normally. I think omarchy should use it once it lands.

One tradeoff worth knowing: with python3 excluded, python3 -m venv .venv inside a project pinning 3.12 builds the venv from system 3.14, quietly. You'd use python3.12 -m venv instead. That's the main cost, and it's why it's a setting rather than the default.

None of this blocks the PR — dropping the global pin is still the right fix, we should enable the setting later once I add it to mise.

Comment thread migrations/1789202883.sh Resolved
@jdx

jdx commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Update: this shipped in mise v2026.9.10 as the shims.exclude setting (jdx/mise#13266).

# ~/.config/mise/config.toml
[settings.shims]
exclude = ["python", "python3", "pip", "pip3"]

or mise settings shims.exclude=python,python3,pip,pip3, or MISE_SHIMS_EXCLUDE=python,python3,pip,pip3.

With that set, mise still installs and manages python normally, but it never creates shims for those names, and any existing ones are removed on the next mise reshim. python/python3/pip always resolve to /usr/bin/* everywhere, including inside a project that pins python, and mise is out of those commands' execution path entirely (no config load per invocation). Version-qualified names like python3.12 still resolve to the pinned version inside a project.

The tradeoff from my earlier comment stands: with python3 excluded, python3 -m venv inside a project builds the venv from the system interpreter. Use python3.12 -m venv (or uv venv) for the mise-managed one.

Two caveats worth knowing for omarchy:

  • It only affects generated shims. If someone uses mise activate without --shims, the tool's bin dir joins PATH as a whole and these names are visible there. Shim-based setups (which is what the omarchy installer configures) are fully covered.
  • It needs mise >= 2026.9.10, so a migration that sets it should make sure mise is upgraded first or tolerate the unknown setting on older versions.

This still doesn't block the PR; dropping the global pin is the right fix on its own. This just makes project-local python pins safe on Arch too.

AI-assisted — Tool: Claude Code; model: anthropic/claude-fable-5-1; version: unavailable.

Co-authored-by: Carlos Eduardo Moreira dos Santos <cems@cemshost.com.br>
@Michallote

Copy link
Copy Markdown
Author

Thanks for the reviews. PR should be good to go.

@dhh
@ryanrhughes

🙏🙏🙏

@omarchybot omarchybot added the bug Something isn't working label Sep 27, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at e6966ca, on a worker built from the Omarchy ISO, against current quattro (821ae58). It merges cleanly.

The bug reproduces on quattro. After omarchy-install-dev-env python, the global mise config has python = "latest". In an interactive shell, where mise's shims come ahead of /usr/bin, python resolves to ~/.local/share/mise/installs/python/latest/bin/python, and import gi (pacman's python-gobject) fails with ModuleNotFoundError. That is the failure #2728 and #3528 describe.

What this PR does on the same machine:

  • omarchy-install-dev-env python installs only uv, writes no global pin, and python stays /usr/bin/python with gi importable. Putting back the old install line brings the pin and the broken import back.
  • The migration, run under bash -euo pipefail on a machine with the old pin, removes it with mise rm -g python. python is the system interpreter again, a project's own mise.toml pinning python = "3.14.8" still gets 3.14.8 inside that project, and the installed interpreters stay on disk. Running it a second time does nothing, and it exits 0 on a home with no mise config.
  • omarchy-remove-dev-env python removes uv and leaves mise's config alone. The menu guards on ~/.local/bin/uv flip as expected after install and after remove.

Tests: ./test/cli on the merge with quattro passed apart from one test, vscode generated theme references current theme file, which fails the same way on quattro without this PR. menu-guards-test.sh (18), menu-test.sh (127) and migrate-scope-test.sh (6) all passed on the worker's live session.

For the maintainer to weigh, not a defect: the migration removes any global mise Python pin, including one a user set on purpose rather than through the Omarchy menu. Nothing tells the two apart, and either kind causes the breakage above.

Second opinion: none. The configured reviewer (Codex Medium) was reachable, but omabot's daily review budget was used up, so this review is one model's (Claude Opus 5.5). Because of that the PR is labelled verified but not ready. It is waiting on a second-opinion review and then on the maintainer.

@Michallote

Copy link
Copy Markdown
Author

For the maintainer to weigh, not a defect: the migration removes any global mise Python pin, including one a user set on purpose rather than through the Omarchy menu. Nothing tells the two apart, and either kind causes the breakage above.

This is a valid point, it doesn't change the conclusion though: the global pin itself is the hazard. The goal of this PR is to remove that pin for unsuspecting users who installed python through the menu. However, the two can't be told apart, so deliberate pins come out with the rest. That's the trade-off, which in my opinion is worth it.

With this PR I am prioritizing system stability (i.e. less surprises for unsuspecting users). Users who genuinely need a global pin can restore it.

.venv projects aren't affected, which is how most Python development is done, so the blast radius is small.

@jdx

jdx commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@Michallote that's why I keep saying to set shims.exclude. It's the fix for the global-pin hazard. With python, python3, pip and pip3 excluded, a global pin can't shadow /usr/bin/python, so the migration wouldn't have to remove deliberate pins

@jandrusk

Copy link
Copy Markdown

Ready from here. Dropping the global mise Python pin is the right Arch fix (jdx agrees). Optional follow-up once maintainers want it: set mise shims.exclude for python/python3/pip/pip3 (mise ≥ 2026.9.10) so even project-local pins can't shadow /usr/bin/python via those names.

@OuttaSpaceTime

Copy link
Copy Markdown

Another reproduction on Omarchy 4.0.4-1, this time with Calibre from extra:

  • calibre 9.14.0-1, system python 3.14.7-1
  • mise 2026.10.10, global python = "latest" set by Install → Development → Python, resolving to 3.15.0

Launching calibre (terminal or app launcher) fails immediately, since its #!/usr/bin/env python3 script gets mise's 3.15:

ModuleNotFoundError: No module named 'msgpack'

/usr/bin/python3 /usr/bin/calibre --version works. Now that latest has moved to 3.15 while Arch is still on 3.14, any packaged app with an env python3 shebang breaks this way, so removing the global pin as this PR does would fix it.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Oct 18, 2026
omarchybot and others added 3 commits October 18, 2026 09:57
quattro now ships uv as a lazy mise default tool, so the Python install keeps quattro's mise uv step and only drops the global python@latest pin. The install guard keys on mise's uv install, since ~/.local/bin/uv no longer exists. Removal keeps quattro's body and guard: the curl-installed uv it removed is gone, and quattro deliberately leaves uv in place on removal. The manual no longer says Python setup installs Python.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The test asserted the global python@latest pin this branch removes, the pin that makes python resolve to mise's interpreter ahead of Arch's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mise rm is mise unuse, which also prunes installs no remaining tracked config needs. A virtualenv built on the old global interpreter declares nothing to mise, so pruning would break it; the migration means to remove only the pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex Medium <noreply@openai.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Oct 18, 2026
@greptile-apps

greptile-apps Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable issue was established.

Summary

Python setup now installs uv without selecting a global Python version.

  • Python setup leaves Arch's interpreter as the global default.

The earlier request for migration tests is cleared because repository guidance explicitly prohibits those tests.

Reviews (2) · Last reviewed commit: "Gate the Python pin migration with an if" · Reviewed by Greptile

Comment thread migrations/1789202883.sh Resolved
@omarchybot omarchybot added the ready Good to merge label Oct 18, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This had stopped merging into quattro after #9596 made uv a lazy mise default tool, so I merged quattro into the branch and pushed it (468c30a). Nothing was rebased or force-pushed, and your commits are unchanged underneath.

How the merge resolves it:

  • omarchy-install-dev-env python keeps quattro's mise-managed uv step and drops only the mise use --global python@latest line, which is this fix. The curl installer is gone because quattro no longer installs uv that way.
  • The Install → Python menu guard now checks ~/.local/share/mise/installs/uv, since ~/.local/bin/uv no longer exists on quattro.
  • omarchy-remove-dev-env python and its menu guard stay as quattro has them. Your branch changed removal to delete the curl-installed uv, but that uv is gone too, and quattro deliberately leaves uv in place when Python is removed. The remove entry now only shows when mise has a Python installed.
  • The migration now runs mise rm -g --no-prune python. Without --no-prune, mise rm (which is mise unuse) also deletes installs that no tracked config needs. A virtualenv built on the old global interpreter declares nothing to mise, so it would lose its interpreter. Codex found this.
  • test/shell.d/mise-python-dev-env-test.sh asserted the global pin. It now asserts that Python setup makes no python call to mise. The manual's sentence saying Python setup installs Python is updated to match.

Verified at 468c30a, on a worker built from the Omarchy ISO, against quattro da2db1a:

  • On quattro, Python setup writes python = "latest" to the global mise config. In a shell with mise's shims ahead of /usr/bin, python resolves to mise's 3.15.0 and import gi fails. This is the failure in Mise Python conflicting with system python #2728, Mise enviroment interfering with some YAY Packages #3528 and the calibre report above.
  • On this branch, setup installs uv and writes no pin. python is /usr/bin/python 3.14.8 and gi imports. Putting the pin line back brings the failure back.
  • The migration, run under bash -euo pipefail on a home with the pin, removes it and keeps every installed interpreter. python is Arch's again, and a project whose mise.toml pins Python still gets 3.15.0. A second run does nothing, and so does a home without a pin.
  • ./test/cli passed. These tests passed on the worker's live session: mise-python-dev-env-test.sh, menu-guards-test.sh, menu-test.sh, migrate-scope-test.sh, mise-lazy-tools-migration-test.sh, menu-guard-budget-test.sh and remove-dev-env-sudo-security-test.sh. CI is green.

Reviewed by Claude Opus 5.5 and Codex Medium. Codex's first round found the pruning issue above. Its second round, at this head, found nothing open. It also agreed that the older migration timestamp is harmless, because omarchy-migrate checks each file's own marker. Independence of that agreement is not guaranteed.

Greptile asked for a shell test of the migration. I haven't added one. The migration was run against real mise on the worker, as above, and whether it needs a mocked test as well is the maintainer's call.

Still the maintainer's to weigh: the migration removes any global mise Python pin, including one a user set on purpose. jdx's shims.exclude suggestion would be a separate follow-up and isn't part of this pull request. It is waiting on the maintainer.

@Michallote

Copy link
Copy Markdown
Author

@jdx I saw your PR #9596, it seems to address this issue. Can we mark this PR and relevant issues as closed?

@jdx

jdx commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

I don't think that pr will affect python. Really I think the best fix would be for the arch packages to not use the python version on PATH but as long as that is the case the fix should be to stop using python via mise. I still don't think it's a good idea to remove the global pins.

@omarchybot omarchybot removed ready Good to merge verified Omarchy Triage has verified that this issue is ready for final review labels Oct 28, 2026
omarchybot and others added 2 commits November 1, 2026 04:17
quattro folded test/shell.d/mise-python-dev-env-test.sh into the table-driven mise-dev-env-test.sh, so the branch's assertion that Python setup makes no python call to mise moves into that table, replacing quattro's check for the global python@latest pin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md prefers a full conditional over an exit in one branch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 1, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

This stopped merging into quattro again, so I merged quattro (d367a56) into the branch and pushed ad1d4a5. Nothing was rebased or force-pushed.

What changed in the branch:

  • quattro's Merge duplicate tests into shared and table-driven files #16337 folded test/shell.d/mise-python-dev-env-test.sh into the table-driven test/shell.d/mise-dev-env-test.sh. The merge deletes the old file and moves its check into the table's Python row: in all three uv scenarios (declared, opted out, undeclared), Python setup makes no python call to mise. That replaces quattro's assertion that setup pins python@latest.
  • migrations/1789202883.sh now wraps the pin removal in an if instead of ending a branch with exit 0, per quattro's AGENTS.md. Its behaviour is unchanged. quattro no longer wants migration tests under test/, so it still has none.

Verified at ad1d4a5, on a worker built from the Omarchy ISO, against quattro d367a56:

  • On quattro, Python setup writes python = "latest" to the global mise config. python then resolves to mise's 3.15.2 and import gi fails.
  • On this branch, setup installs uv and writes no pin. python is /usr/bin/python 3.14.9 and gi imports. Putting the pin line back brings the failure back, and the updated mise-dev-env-test.sh fails on that revert.
  • The migration was run under bash -euo pipefail on a home with the pin. It removed the pin and kept every installed interpreter, python went back to Arch's, and a project whose mise.toml pins Python still got 3.15.2. A second run did nothing, and neither did a run on an empty home.
  • ./test/cli passed, as did mise-dev-env-test.sh, menu-guards-test.sh, menu-test.sh, menu-guard-budget-test.sh, migrate-scope-test.sh and remove-dev-env-rust-test.sh.

Reviewed by Claude Opus 5.5, Codex Medium and muse-wonder (pi, thinking high). Neither second reviewer found a defect at this head. Both confirmed that omarchy-migrate still runs the older-stamped migration, since it checks each file's own marker. Their agreement is not guaranteed to be independent.

One thing for @Michallote: the description's Fix section still describes the branch from before the quattro port. It says omarchy-remove-dev-env stops uninstalling mise Python and that the menu guards key on ~/.local/bin/uv, and the diff does neither. Here is what the diff does now:

  • omarchy-install-dev-env python installs only uv (through mise, as quattro does) and sets no global mise Python.
  • The Install → Python guard keys on ~/.local/share/mise/installs/uv, the same way Node's keys on installs/node.
  • omarchy-remove-dev-env python and its menu guard are unchanged: removal still uninstalls mise Python and keeps uv.
  • A migration drops an existing global mise Python pin with --no-prune, so installed interpreters stay.

Could you update the description to match? Whoever reads it before merging will otherwise look for changes that aren't there.

Still the maintainer's to weigh: the migration removes any global mise Python pin, including one a user set on purpose.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 1, 2026
@Michallote

Copy link
Copy Markdown
Author

@omarchybot Description updated.

Still the maintainer's to weigh: the migration removes any global mise Python pin, including one a user set on purpose.

An user setting a global pin on purpose still breaks things on Arch inadvertently, at the operating system level. Removing it in the migration avoids errors the user would later attribute to Omarchy.

@omarchybot omarchybot added the verified Omarchy Triage has verified that this issue is ready for final review label Nov 2, 2026
@omarchybot

Copy link
Copy Markdown
Collaborator

Thanks for updating the description, @Michallote. I checked it against the diff at ad1d4a5 and it matches: the installer, the Install → Python guard, the unchanged removal path and the --no-prune migration all do what it says, and #2728, #2831, #3528, #3637 and #9158 all report the same global mise Python shim breaking packaged or AUR Python.

The code hasn't changed since the worker verification in my last comment, and the 36 commits quattro has gained since touch none of these files. The branch still merges cleanly, so that result stands and the verified label is back on.

Reviewed by Claude Opus 5.5, Codex Medium and muse-wonder (pi, thinking high). Both second reviewers read the new description and your reply. Neither found a defect. They agreed that a global pin breaks things the same way whoever set it, because the shim on PATH can't tell who wrote the pin. They also noted it only breaks consumers that find python through PATH, not ones that call /usr/bin/python directly. Their agreement is not guaranteed to be independent.

What's left is the maintainer's call: whether the migration should also remove a global pin a user set on purpose (your reasoning is above for them to weigh), and that Install → Python shows as disabled once uv is installed, the same way Node's row does once Node is installed.

@omarchybot omarchybot removed the verified Omarchy Triage has verified that this issue is ready for final review label Nov 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

7 participants