# languages: Avoid probing unresolved macOS Python shim \(\#62534\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/93f6b2e59725de4ac54c73867f69d3bb00091673)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 93f6b2e59725de4ac54c73867f69d3bb00091673

Requested commit: 93f6b2e59725de4ac54c73867f69d3bb00091673

Commit: 93f6b2e59725de4ac54c73867f69d3bb00091673

Tree: fbbce43a08bc4644d784f8ea984df3b4f54c91c6

Author: Connor Edwards

Committer: GitHub

## Message

```
languages: Avoid probing unresolved macOS Python shim (#62534)

# Objective

Fixes #62529.

Prevent Python toolchain discovery from executing Apple's
`/usr/bin/python3` Command Line Tools shim when no active developer
Python exists. Executing that unresolved shim causes macOS to repeatedly
prompt users to install the Command Line Tools, even when Python is
managed through Nix, uv, or pyenv.

## Solution

Update Python Environment Tools (PET) to `bb8e046`, which includes
microsoft/python-environment-tools#506. That upstream change resolves
active Xcode and Command Line Tools Python executables from filesystem
state and skips unresolved macOS system Python shims before generic
process probing.

Adapt Zed to the updated PET API by:

- displaying the newly supported Hatch environment kind
- passing no refresh identifier when running in-process environment
discovery

## Testing

- `cargo check -p languages --locked`
- PET unit tests covering unresolved macOS system Python shims
- The Zed compilation check was run on Linux; the original dialog
reproduction was not manually tested on macOS.

## Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

---

Release Notes:

- Fixed Python toolchain discovery prompting installation of Apple
Command Line Tools when using a separately managed Python installation.
```

## Parents

- [bc463bc205f944d620d5925f01dc59b1adc4084e](https://git.cafe/gitcafe/zed/commit/bc463bc205f944d620d5925f01dc59b1adc4084e?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/93f6b2e59725de4ac54c73867f69d3bb00091673?format=markdown)
