diff --git a/crates/uv/src/commands/python/install.rs b/crates/uv/src/commands/python/install.rs index feb0cf7c7..b9d4660df 100644 --- a/crates/uv/src/commands/python/install.rs +++ b/crates/uv/src/commands/python/install.rs @@ -501,7 +501,7 @@ pub(crate) async fn install( ); } - if preview.is_enabled() && !matches!(registry, Some(false)) { + if !matches!(registry, Some(false)) { #[cfg(windows)] { match uv_python::windows_registry::create_registry_entry(installation) { diff --git a/crates/uv/src/commands/python/uninstall.rs b/crates/uv/src/commands/python/uninstall.rs index 642942d07..dd306fc4d 100644 --- a/crates/uv/src/commands/python/uninstall.rs +++ b/crates/uv/src/commands/python/uninstall.rs @@ -211,7 +211,7 @@ async fn do_uninstall( } #[cfg(windows)] - if preview.is_enabled() { + { uv_python::windows_registry::remove_registry_entry( &matching_installations, all, diff --git a/docs/concepts/python-versions.md b/docs/concepts/python-versions.md index a7472bea8..ee18fa9da 100644 --- a/docs/concepts/python-versions.md +++ b/docs/concepts/python-versions.md @@ -435,3 +435,18 @@ are not yet available for musl Linux on ARM). ### PyPy distributions PyPy distributions are provided by the PyPy project. + +## Registration in the Windows registry + +On Windows, installation of managed Python versions will register them with the Windows registry as +defined by [PEP 514](https://peps.python.org/pep-0514/). + +After installation, the Python versions can be selected with the `py` launcher, e.g.: + +```console +$ uv python install 3.13.1 +$ py -V:Astral/CPython3.13.1 +``` + +On uninstall, uv will remove the registry entry for the target version as well as any broken +registry entries.