Replace --python-preference installed with managed (#5637)

Collapses the previous default into "managed" and makes the "managed"
behavior match "installed". People should use "only-managed" if they
want that behavior, it seems overly complicated otherwise.
This commit is contained in:
Zanie Blue 2024-07-31 09:40:39 -04:00 committed by GitHub
parent 981661c4af
commit 7ef830460e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 27 additions and 49 deletions

View file

@ -88,13 +88,6 @@ impl PythonInstallation {
) -> Result<Self, Error> {
let request = request.unwrap_or_default();
// Perform a fetch aggressively if managed Python is preferred
if matches!(preference, PythonPreference::Managed) && python_fetch.is_automatic() {
if let Some(request) = PythonDownloadRequest::from_request(&request) {
return Self::fetch(request.fill(), client_builder, cache, reporter).await;
}
}
// Search for the installation
match Self::find(&request, environments, preference, cache) {
Ok(venv) => Ok(venv),