Display Python implementation when creating environments (#7652)

e.g.

```
❯ cargo run -q -- venv -p pypy
Using PyPy 3.9.19
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
```
This commit is contained in:
Zanie Blue 2024-09-24 11:45:52 -05:00 committed by GitHub
parent 0c6117f5da
commit bcd14ec799
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 124 additions and 118 deletions

View file

@ -449,18 +449,21 @@ impl FoundInterpreter {
.await?;
let managed = python.source().is_managed();
let implementation = python.implementation();
let interpreter = python.into_interpreter();
if managed {
writeln!(
printer.stderr(),
"Using Python {}",
"Using {} {}",
implementation.pretty(),
interpreter.python_version().cyan()
)?;
} else {
writeln!(
printer.stderr(),
"Using Python {} interpreter at: {}",
"Using {} {} interpreter at: {}",
implementation.pretty(),
interpreter.python_version(),
interpreter.sys_executable().user_display().cyan()
)?;

View file

@ -222,6 +222,7 @@ async fn venv_impl(
.into_diagnostic()?;
let managed = python.source().is_managed();
let implementation = python.implementation();
let interpreter = python.into_interpreter();
// Add all authenticated sources to the cache.
@ -232,14 +233,16 @@ async fn venv_impl(
if managed {
writeln!(
printer.stderr(),
"Using Python {}",
"Using {} {}",
implementation.pretty(),
interpreter.python_version().cyan()
)
.into_diagnostic()?;
} else {
writeln!(
printer.stderr(),
"Using Python {} interpreter at: {}",
"Using {} {} interpreter at: {}",
implementation.pretty(),
interpreter.python_version(),
interpreter.sys_executable().user_display().cyan()
)

View file

@ -2039,7 +2039,7 @@ fn add_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 2 packages in [TIME]
Prepared 2 packages in [TIME]

View file

@ -511,7 +511,7 @@ fn relative_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 3 packages in [TIME]
"###);

View file

@ -49,7 +49,7 @@ fn init() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 1 package in [TIME]
"###);
@ -127,7 +127,7 @@ fn init_application() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 1 package in [TIME]
Audited in [TIME]
@ -308,7 +308,7 @@ fn init_application_package() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
@ -390,7 +390,7 @@ fn init_library() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
@ -604,7 +604,7 @@ fn init_library_current_dir() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 1 package in [TIME]
"###);
@ -668,7 +668,7 @@ fn init_application_current_dir() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 1 package in [TIME]
"###);
@ -733,7 +733,7 @@ fn init_dot_args() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 1 package in [TIME]
"###);

View file

@ -3473,7 +3473,7 @@ fn lock_requires_python_wheels() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 2 packages in [TIME]
"###);
@ -3535,7 +3535,7 @@ fn lock_requires_python_wheels() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 2 packages in [TIME]
"###);
@ -3560,7 +3560,7 @@ fn lock_requires_python_wheels() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Resolved 2 packages in [TIME]
"###);
@ -3637,7 +3637,7 @@ fn lock_requires_python_wheels() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Resolved 2 packages in [TIME]
"###);
@ -5604,7 +5604,7 @@ fn lock_exclusion() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 2 packages in [TIME]
"###);
@ -5732,7 +5732,7 @@ fn lock_dev_transitive() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 5 packages in [TIME]
"###);
@ -7108,7 +7108,7 @@ fn lock_find_links_local_wheel() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 2 packages in [TIME]
"###);
@ -7154,7 +7154,7 @@ fn lock_find_links_local_wheel() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 2 packages in [TIME]
"###);
@ -7165,7 +7165,7 @@ fn lock_find_links_local_wheel() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Prepared 1 package in [TIME]
Installed 2 packages in [TIME]
@ -7226,7 +7226,7 @@ fn lock_find_links_local_sdist() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 2 packages in [TIME]
"###);
@ -7270,7 +7270,7 @@ fn lock_find_links_local_sdist() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 2 packages in [TIME]
"###);
@ -7281,7 +7281,7 @@ fn lock_find_links_local_sdist() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Prepared 2 packages in [TIME]
Installed 2 packages in [TIME]
@ -8327,7 +8327,7 @@ fn lock_mixed_extras() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 6 packages in [TIME]
"###);
@ -8431,7 +8431,7 @@ fn lock_mixed_extras() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 6 packages in [TIME]
"###);
@ -8443,7 +8443,7 @@ fn lock_mixed_extras() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Prepared 4 packages in [TIME]
Installed 4 packages in [TIME]
@ -8525,7 +8525,7 @@ fn lock_transitive_extra() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 4 packages in [TIME]
"###);
@ -8610,7 +8610,7 @@ fn lock_transitive_extra() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 4 packages in [TIME]
"###);
@ -8622,7 +8622,7 @@ fn lock_transitive_extra() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Prepared 2 packages in [TIME]
Installed 2 packages in [TIME]
@ -12958,7 +12958,7 @@ fn lock_request_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
error: The requested interpreter resolved to Python 3.12.[X], which is incompatible with the project's Python requirement: `>=3.8, <=3.10`
"###);
@ -12972,7 +12972,7 @@ fn lock_request_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
error: The Python request from `.python-version` resolved to Python 3.12.[X], which is incompatible with the project's Python requirement: `>=3.8, <=3.10`
"###);
@ -13083,7 +13083,7 @@ fn lock_invalid_project_table() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
error: Failed to build: `b @ file://[TEMP_DIR]/b`
Caused by: Failed to extract static metadata from `pyproject.toml`
Caused by: `pyproject.toml` is using the `[project]` table, but the required `project.name` field is not set.

View file

@ -5584,7 +5584,7 @@ fn sync_seed() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.8.[X] interpreter at: [PYTHON-3.8]
Using CPython 3.8.[X] interpreter at: [PYTHON-3.8]
Creating virtual environment with seed packages at: .venv
+ pip==24.0
+ setuptools==69.2.0

View file

@ -56,7 +56,7 @@ fn run_with_python_version() -> Result<()> {
3.7.0
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 5 packages in [TIME]
Prepared 4 packages in [TIME]
@ -105,7 +105,7 @@ fn run_with_python_version() -> Result<()> {
3.6.0
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Resolved 5 packages in [TIME]
@ -133,7 +133,7 @@ fn run_with_python_version() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.8.[X] interpreter at: [PYTHON-3.8]
Using CPython 3.8.[X] interpreter at: [PYTHON-3.8]
error: The requested interpreter resolved to Python 3.8.[X], which is incompatible with the project's Python requirement: `>=3.11, <4`
"###);
@ -1414,7 +1414,7 @@ fn run_from_directory() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=.venv` does not match the project environment path `[PROJECT_VENV]/` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: [PROJECT_VENV]/
Resolved 1 package in [TIME]
Prepared 1 package in [TIME]
@ -1489,7 +1489,7 @@ fn run_from_directory() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=.venv` does not match the project environment path `[PROJECT_VENV]/` and will be ignored
Using Python 3.10.[X] interpreter at: [PYTHON-3.10]
Using CPython 3.10.[X] interpreter at: [PYTHON-3.10]
Removed virtual environment at: [PROJECT_VENV]/
Creating virtual environment at: [PROJECT_VENV]/
Resolved 1 package in [TIME]
@ -1600,7 +1600,7 @@ fn run_isolated_python_version() -> Result<()> {
(3, 8)
----- stderr -----
Using Python 3.8.[X] interpreter at: [PYTHON-3.8]
Using CPython 3.8.[X] interpreter at: [PYTHON-3.8]
Creating virtual environment at: .venv
Resolved 6 packages in [TIME]
Prepared 6 packages in [TIME]
@ -1908,7 +1908,7 @@ fn run_isolated_incompatible_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.8.[X] interpreter at: [PYTHON-3.8]
Using CPython 3.8.[X] interpreter at: [PYTHON-3.8]
error: The Python request from `.python-version` resolved to Python 3.8.[X], which is incompatible with the project's Python requirement: `>=3.12`
"###);

View file

@ -358,7 +358,7 @@ fn mixed_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 5 packages in [TIME]
Prepared 5 packages in [TIME]
@ -377,7 +377,7 @@ fn mixed_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.8.[X] interpreter at: [PYTHON-3.8]
Using CPython 3.8.[X] interpreter at: [PYTHON-3.8]
error: The requested interpreter resolved to Python 3.8.[X], which is incompatible with the project's Python requirement: `>=3.12`. However, a workspace member (`bird-feeder`) supports Python >=3.8. To install the workspace member on its own, navigate to `packages/bird-feeder`, then run `uv venv --python 3.8.[X]` followed by `uv pip install -e .`.
"###);
@ -1188,7 +1188,7 @@ fn no_install_workspace() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Installed 4 packages in [TIME]
+ anyio==3.7.0
@ -1635,7 +1635,7 @@ fn sync_custom_environment_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 2 packages in [TIME]
Prepared 1 package in [TIME]
@ -1655,7 +1655,7 @@ fn sync_custom_environment_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: foo
Resolved 2 packages in [TIME]
Installed 1 package in [TIME]
@ -1680,7 +1680,7 @@ fn sync_custom_environment_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: foobar/.venv
Resolved 2 packages in [TIME]
Installed 1 package in [TIME]
@ -1705,7 +1705,7 @@ fn sync_custom_environment_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: bar
Resolved 2 packages in [TIME]
Installed 1 package in [TIME]
@ -1726,7 +1726,7 @@ fn sync_custom_environment_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: [OTHER_TEMPDIR]/.venv
Resolved 2 packages in [TIME]
Installed 1 package in [TIME]
@ -1758,7 +1758,7 @@ fn sync_custom_environment_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: foo
Activate with: source foo/[BIN]/activate
"###);
@ -1773,7 +1773,7 @@ fn sync_custom_environment_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Removed virtual environment at: foo
Creating virtual environment at: foo
Resolved 2 packages in [TIME]
@ -1850,7 +1850,7 @@ fn sync_workspace_custom_environment_path() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: foo
Resolved 3 packages in [TIME]
Installed 1 package in [TIME]
@ -2006,7 +2006,7 @@ fn sync_virtual_env_warning() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: foo
Resolved 2 packages in [TIME]
Installed 1 package in [TIME]
@ -2021,7 +2021,7 @@ fn sync_virtual_env_warning() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=foo` does not match the project environment path `bar` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: bar
Resolved 2 packages in [TIME]
Installed 1 package in [TIME]
@ -2083,7 +2083,7 @@ fn sync_update_project() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 2 packages in [TIME]
Prepared 2 packages in [TIME]
@ -2146,7 +2146,7 @@ fn sync_environment_prompt() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 2 packages in [TIME]
Prepared 1 package in [TIME]
@ -2651,7 +2651,7 @@ fn sync_invalid_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###);
@ -2666,7 +2666,7 @@ fn sync_invalid_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Resolved 2 packages in [TIME]
@ -2689,7 +2689,7 @@ fn sync_invalid_environment() -> Result<()> {
----- stderr -----
warning: Ignoring existing virtual environment linked to non-existent Python interpreter: .venv/[BIN]/python -> python
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Removed virtual environment at: .venv
Creating virtual environment at: .venv
Resolved 2 packages in [TIME]
@ -2717,7 +2717,7 @@ fn sync_invalid_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###);
@ -2735,7 +2735,7 @@ fn sync_invalid_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
error: Project virtual environment directory `[VENV]/` cannot be used because it is not a compatible environment but cannot be recreated because it is not a virtual environment
"###);

View file

@ -25,7 +25,7 @@ fn create_venv() {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -43,7 +43,7 @@ fn create_venv() {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -63,7 +63,7 @@ fn create_venv_project_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -93,7 +93,7 @@ fn create_venv_project_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: foo
Activate with: source foo/[BIN]/activate
"###
@ -114,7 +114,7 @@ fn create_venv_project_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -131,7 +131,7 @@ fn create_venv_project_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: bar
Activate with: source bar/[BIN]/activate
"###
@ -149,7 +149,7 @@ fn create_venv_project_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -161,7 +161,7 @@ fn create_venv_project_environment() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -181,7 +181,7 @@ fn create_venv_defaults_to_cwd() {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -202,7 +202,7 @@ fn create_venv_ignores_virtual_env_variable() {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -220,7 +220,7 @@ fn create_venv_reads_request_from_python_version_file() {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -239,7 +239,7 @@ fn create_venv_reads_request_from_python_version_file() {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -259,7 +259,7 @@ fn create_venv_reads_request_from_python_versions_file() {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -278,7 +278,7 @@ fn create_venv_reads_request_from_python_versions_file() {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -298,7 +298,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -321,7 +321,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.9.[X] interpreter at: [PYTHON-3.9]
Using CPython 3.9.[X] interpreter at: [PYTHON-3.9]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -344,7 +344,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -367,7 +367,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -401,7 +401,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -424,7 +424,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -447,7 +447,7 @@ fn create_venv_respects_pyproject_requires_python() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -471,7 +471,7 @@ fn create_venv_ignores_missing_pyproject_metadata() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -503,7 +503,7 @@ fn create_venv_warns_user_on_requires_python_discovery_error() -> Result<()> {
expected `.`, `=`
warning: Failed to parse: `pyproject.toml`
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -530,7 +530,7 @@ fn create_venv_explicit_request_takes_priority_over_python_version_file() {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -552,7 +552,7 @@ fn seed() {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment with seed packages at: .venv
+ pip==24.0
Activate with: source .venv/[BIN]/activate
@ -575,7 +575,7 @@ fn seed_older_python_version() {
----- stdout -----
----- stderr -----
Using Python 3.11.[X] interpreter at: [PYTHON-3.11]
Using CPython 3.11.[X] interpreter at: [PYTHON-3.11]
Creating virtual environment with seed packages at: .venv
+ pip==24.0
+ setuptools==69.2.0
@ -677,7 +677,7 @@ fn create_venv_python_patch() {
----- stdout -----
----- stderr -----
Using Python 3.12.1 interpreter at: [PYTHON-3.12.1]
Using CPython 3.12.1 interpreter at: [PYTHON-3.12.1]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -702,7 +702,7 @@ fn file_exists() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
uv::venv::creation
@ -729,7 +729,7 @@ fn empty_dir_exists() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -757,7 +757,7 @@ fn non_empty_dir_exists() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
uv::venv::creation
@ -787,7 +787,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
uv::venv::creation
@ -806,7 +806,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -824,7 +824,7 @@ fn non_empty_dir_exists_allow_existing() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -869,7 +869,7 @@ fn windows_shims() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.8.[X] interpreter at: [PYTHON-3.8]
Using CPython 3.8.[X] interpreter at: [PYTHON-3.8]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###
@ -896,7 +896,7 @@ fn virtualenv_compatibility() {
----- stderr -----
warning: virtualenv's `--clear` has no effect (uv always clears the virtual environment)
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Activate with: source .venv/[BIN]/activate
"###

View file

@ -378,7 +378,7 @@ fn test_uv_run_with_package_virtual_workspace() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 8 packages in [TIME]
Prepared 5 packages in [TIME]
@ -438,7 +438,7 @@ fn test_uv_run_virtual_workspace_root() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 8 packages in [TIME]
Prepared 7 packages in [TIME]
@ -483,7 +483,7 @@ fn test_uv_run_with_package_root_workspace() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 8 packages in [TIME]
Prepared 5 packages in [TIME]
@ -548,7 +548,7 @@ fn test_uv_run_isolate() -> Result<()> {
----- stderr -----
warning: `VIRTUAL_ENV=[VENV]/` does not match the project environment path `.venv` and will be ignored
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Creating virtual environment at: .venv
Resolved 8 packages in [TIME]
Prepared 7 packages in [TIME]
@ -762,7 +762,7 @@ fn workspace_to_workspace_paths_dependencies() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 4 packages in [TIME]
"###
);
@ -867,7 +867,7 @@ fn workspace_hidden_files() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 2 packages in [TIME]
"###
);
@ -930,7 +930,7 @@ fn workspace_hidden_member() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 3 packages in [TIME]
"###
);
@ -994,7 +994,7 @@ fn workspace_non_included_member() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 1 package in [TIME]
"###
);
@ -1075,7 +1075,7 @@ fn workspace_inherit_sources() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
× No solution found when resolving dependencies:
Because library was not found in the cache and leaf depends on library, we can conclude that leaf's requirements are unsatisfiable.
And because your workspace requires leaf, we can conclude that your workspace's requirements are unsatisfiable.
@ -1107,7 +1107,7 @@ fn workspace_inherit_sources() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 3 packages in [TIME]
"###
);
@ -1150,7 +1150,7 @@ fn workspace_inherit_sources() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 3 packages in [TIME]
"###
);
@ -1241,7 +1241,7 @@ fn workspace_inherit_sources() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 3 packages in [TIME]
"###
);
@ -1294,7 +1294,7 @@ fn workspace_unsatisfiable_member_dependencies() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
× No solution found when resolving dependencies:
Because only httpx<=1.0.0b0 is available and leaf depends on httpx>9999, we can conclude that leaf's requirements are unsatisfiable.
And because your workspace requires leaf, we can conclude that your workspace's requirements are unsatisfiable.
@ -1362,7 +1362,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
× No solution found when resolving dependencies:
Because bar depends on anyio==4.2.0 and foo depends on anyio==4.1.0, we can conclude that bar and foo are incompatible.
And because your workspace requires bar and foo, we can conclude that your workspace's requirements are unsatisfiable.
@ -1445,7 +1445,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting_threeway() -> Result<
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
× No solution found when resolving dependencies:
Because bird depends on anyio==4.3.0 and knot depends on anyio==4.2.0, we can conclude that bird and knot are incompatible.
And because your workspace requires bird and knot, we can conclude that your workspace's requirements are unsatisfiable.
@ -1515,7 +1515,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting_extra() -> Result<()>
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
× No solution found when resolving dependencies:
Because bar[some-extra] depends on anyio==4.2.0 and foo depends on anyio==4.1.0, we can conclude that foo and bar[some-extra] are incompatible.
And because your workspace requires bar[some-extra] and foo, we can conclude that your workspace's requirements are unsatisfiable.
@ -1585,7 +1585,7 @@ fn workspace_unsatisfiable_member_dependencies_conflicting_dev() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
× No solution found when resolving dependencies:
Because bar depends on bar:dev and bar:dev depends on anyio==4.2.0, we can conclude that bar depends on anyio==4.2.0.
And because foo depends on anyio==4.1.0, we can conclude that bar and foo are incompatible.
@ -1657,7 +1657,7 @@ fn workspace_member_name_shadows_dependencies() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
error: Failed to build: `foo @ file://[TEMP_DIR]/workspace/packages/foo`
Caused by: Failed to parse entry for: `anyio`
Caused by: Package is not included as workspace package in `tool.uv.workspace`
@ -1701,7 +1701,7 @@ fn test_path_hopping() -> Result<()> {
----- stdout -----
----- stderr -----
Using Python 3.12.[X] interpreter at: [PYTHON-3.12]
Using CPython 3.12.[X] interpreter at: [PYTHON-3.12]
Resolved 3 packages in [TIME]
"###
);

View file

@ -142,7 +142,7 @@ Download Python versions as needed:
```console
$ uv venv --python 3.12.0
Using Python 3.12.0
Using CPython 3.12.0
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
@ -210,7 +210,7 @@ Create a virtual environment:
```console
$ uv venv
Using Python 3.12.3
Using CPython 3.12.3
Creating virtual environment at: .venv
Activate with: source .venv/bin/activate
```