Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Python installed from Windows Store (#2122)
## Summary After #2121, the only remaining issue is that calling `canonicalize` on these Pythons returns an error. Closes #2105. ## Test Plan Uninstalled all python.org Pythons on my Windows machine, then created a virtualenv. The resulting config file: ``` Using Python 3.11.8 interpreter at: C:\Users\crmar\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe Creating virtualenv at: .venv Activate with: .venv\Scripts\activate PS C:\Users\crmar\workspace\puffin> cat .\.venv\pyvenv.cfg home = C:\Users\crmar\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0 implementation = CPython version_info = 3.11.8 include-system-site-packages = false uv = 0.1.13 prompt = puffin ``` Prior to this PR, it would fail with a canonicalization error. Prior to #2121, it would leave a "bad" Python in the config file: ``` Using Python 3.11.8 interpreter at: C:\Users\crmar\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\python.exe Creating virtualenv at: .venv Activate with: .venv\Scripts\activate PS C:\Users\crmar\workspace\puffin> cat .\.venv\pyvenv.cfg home = C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0 implementation = CPython version_info = 3.11.8 include-system-site-packages = false uv = 0.1.13 prompt = puffin ``` Which, once activated, would fail with: ``` (venv) PS C:\Users\crmar\workspace\puffin> python No Python at '"C:\Users\crmar\AppData\Local\Programs\Python\Python312\python.exe' ```
- Loading branch information