Skip to content

plugin: prefer Python outside WindowsApps on Windows (#144) - #153

Merged
Saksham Uboweja (SakshamUboweja) merged 1 commit into
microsoft:mainfrom
TejasLamba2006:fix/windowsapps-python-alias
Nov 6, 2026
Merged

Saksham Uboweja (SakshamUboweja) merged 1 commit into
microsoft:mainfrom
TejasLamba2006:fix/windowsapps-python-alias

Conversation

@TejasLamba2006

Copy link
Copy Markdown
Contributor

Fixes #144.

On Windows (Git Bash), python3 often resolves to %LOCALAPPDATA%\Microsoft\WindowsApps\python3.exe ahead of %LOCALAPPDATA%\Python\bin\python3.exe. Both te-hook and te ran a python3 -c "" probe and then exec against that alias on every hook event, triggering the AppXSvc memory leak (python/pymanager#396).

This updates te-hook and te on Windows_NT to look for a Python executable outside *WindowsApps* first (with no subprocess probe), and only fall back to probing a WindowsApps alias when no other interpreter is on PATH. Also added regression tests in tests/test_plugin_package.py.

@SakshamUboweja
Saksham Uboweja (SakshamUboweja) merged commit 0aa2aca into microsoft:main Nov 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows: te-hook launches the Python Install Manager alias twice per hook event; each launch leaks memory in AppXSvc (23.6 GB in 8 h)

2 participants