mirror of
https://github.com/astral-sh/uv.git
synced 2025-10-28 10:50:29 +00:00
Improve display of selected interpreter sources (#3748)
e.g. this error message is not great ``` ❯ uv venv --python 3.12.2 × No interpreter found for Python 3.12.2 in provided path, search path, managed toolchains, or parent interpreter ```
This commit is contained in:
parent
6962147831
commit
0e75eb8d78
6 changed files with 103 additions and 75 deletions
|
|
@ -700,12 +700,7 @@ mod tests {
|
|||
fn find_interpreter_version_minor() -> Result<()> {
|
||||
let tempdir = TempDir::new()?;
|
||||
let cache = Cache::temp()?;
|
||||
let sources = SourceSelector::from_sources([
|
||||
InterpreterSource::ProvidedPath,
|
||||
InterpreterSource::ActiveEnvironment,
|
||||
InterpreterSource::DiscoveredEnvironment,
|
||||
InterpreterSource::SearchPath,
|
||||
]);
|
||||
let sources = SourceSelector::All;
|
||||
|
||||
with_vars(
|
||||
[
|
||||
|
|
@ -757,12 +752,7 @@ mod tests {
|
|||
fn find_interpreter_version_patch() -> Result<()> {
|
||||
let tempdir = TempDir::new()?;
|
||||
let cache = Cache::temp()?;
|
||||
let sources = SourceSelector::from_sources([
|
||||
InterpreterSource::ProvidedPath,
|
||||
InterpreterSource::ActiveEnvironment,
|
||||
InterpreterSource::DiscoveredEnvironment,
|
||||
InterpreterSource::SearchPath,
|
||||
]);
|
||||
let sources = SourceSelector::All;
|
||||
|
||||
with_vars(
|
||||
[
|
||||
|
|
@ -814,12 +804,7 @@ mod tests {
|
|||
fn find_interpreter_version_minor_no_match() -> Result<()> {
|
||||
let tempdir = TempDir::new()?;
|
||||
let cache = Cache::temp()?;
|
||||
let sources = SourceSelector::from_sources([
|
||||
InterpreterSource::ProvidedPath,
|
||||
InterpreterSource::ActiveEnvironment,
|
||||
InterpreterSource::DiscoveredEnvironment,
|
||||
InterpreterSource::SearchPath,
|
||||
]);
|
||||
let sources = SourceSelector::All;
|
||||
|
||||
with_vars(
|
||||
[
|
||||
|
|
@ -861,12 +846,7 @@ mod tests {
|
|||
fn find_interpreter_version_patch_no_match() -> Result<()> {
|
||||
let tempdir = TempDir::new()?;
|
||||
let cache = Cache::temp()?;
|
||||
let sources = SourceSelector::from_sources([
|
||||
InterpreterSource::ProvidedPath,
|
||||
InterpreterSource::ActiveEnvironment,
|
||||
InterpreterSource::DiscoveredEnvironment,
|
||||
InterpreterSource::SearchPath,
|
||||
]);
|
||||
let sources = SourceSelector::All;
|
||||
|
||||
with_vars(
|
||||
[
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue