Refactor uv-toolchain types (#4121)

Extends #4120 
Part of #2607 

There should be no behavior changes here. Restructures the discovery API
to be focused on a toolchain first perspective in preparation for
exposing a `find_or_fetch` method for toolchains in
https://github.com/astral-sh/uv/pull/4138.
This commit is contained in:
Zanie Blue 2024-06-07 15:20:28 -04:00 committed by GitHub
parent 325982c418
commit 53035d65a1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 777 additions and 746 deletions

View file

@ -15,7 +15,7 @@ fn resolve_warm_jupyter(c: &mut Criterion<WallTime>) {
.unwrap();
let cache = &Cache::from_path("../../.cache").init().unwrap();
let venv = PythonEnvironment::from_virtualenv(cache).unwrap();
let venv = PythonEnvironment::from_root("../../.venv", cache).unwrap();
let client = &RegistryClientBuilder::new(cache.clone()).build();
let manifest = &Manifest::simple(vec![Requirement::from(
pep508_rs::Requirement::from_str("jupyter").unwrap(),
@ -44,7 +44,7 @@ fn resolve_warm_airflow(c: &mut Criterion<WallTime>) {
.unwrap();
let cache = &Cache::from_path("../../.cache").init().unwrap();
let venv = PythonEnvironment::from_virtualenv(cache).unwrap();
let venv = PythonEnvironment::from_root("../../.venv", cache).unwrap();
let client = &RegistryClientBuilder::new(cache.clone()).build();
let manifest = &Manifest::simple(vec![
Requirement::from(pep508_rs::Requirement::from_str("apache-airflow[all]").unwrap()),