From 7502a963e15ae40422f8386b64f8b6c72af22d82 Mon Sep 17 00:00:00 2001
From: Zanie Blue If a virtual environment is active or found in a current or parent directory, it will be used as if there was no project or workspace. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Do not create a For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Disable network access. For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Disable network access. For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Disable network access. For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Disable network access. For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Disable network access. Otherwise, when no request is provided, the Python requirement of a project in the current directory or parent directories will be used. Disable automatic downloads of Python Disable automatic downloads of Python. Disable network access. For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Avoid validating the Python pin is compatible with the workspace. For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Disable network access. For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Disable network access. For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the For example, spinners or progress bars. Disable automatic downloads of Python Disable automatic downloads of Python. Ignore the uv help python",
"uv python",
),
+ // Drop the manually included `env` section for `--no-python-downloads`
+ // TODO(zanieb): In general, we should show all of the environment variables in the reference
+ // but this one is non-standard so it's the only one included right now. When we tackle the rest
+ // we can fix the formatting.
+ (" [env: "UVPYTHONDOWNLOADS=never"]", ""),
];
const SHOW_HIDDEN_COMMANDS: &[&str] = &["generate-shell-completion"];
diff --git a/crates/uv-python/src/discovery.rs b/crates/uv-python/src/discovery.rs
index 8a9552f27..ae36283a9 100644
--- a/crates/uv-python/src/discovery.rs
+++ b/crates/uv-python/src/discovery.rs
@@ -89,6 +89,19 @@ pub enum PythonDownloads {
Never,
}
+impl FromStr for PythonDownloads {
+ type Err = String;
+
+ fn from_str(s: &str) -> Result--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-readmeREADME.md file--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--offline--no-python-downloads--no-python-downloads--offline--no-python-downloads--no-python-downloads--offline--no-python-downloads--no-python-downloads--offline--no-python-downloads--no-python-downloads--offline--no-python-downloads--no-python-downloads--offline--no-python-downloads--no-python-downloads--no-workspace--no-python-downloads--no-python-downloads--offline--no-python-downloads--no-python-downloads--offline--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources--no-python-downloads--no-python-downloads--no-sourcestool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
--no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--no-sourcesIgnore the tool.uv.sources table when resolving dependencies. Used to lock against the standards-compliant, publishable package metadata, as opposed to using any local or Git sources
For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -4722,7 +4722,7 @@ uv pip freeze [OPTIONS]For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -4835,7 +4835,7 @@ uv pip list [OPTIONS]For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -4936,7 +4936,7 @@ uv pip show [OPTIONS] [PACKAGE]...For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -5038,7 +5038,7 @@ uv pip tree [OPTIONS]For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--no-system--offlineDisable network access.
@@ -5139,7 +5139,7 @@ uv pip check [OPTIONS]For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -5317,7 +5317,7 @@ uv venv [OPTIONS] [NAME]For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -5452,7 +5452,7 @@ uv cache clean [OPTIONS] [PACKAGE]...For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -5539,7 +5539,7 @@ uv cache prune [OPTIONS]For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -5628,7 +5628,7 @@ uv cache dir [OPTIONS]For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -5709,7 +5709,7 @@ uv version [OPTIONS]For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.
@@ -5814,7 +5814,7 @@ uv help [OPTIONS] [COMMAND]...For example, spinners or progress bars.
---no-python-downloadsDisable automatic downloads of Python
+--no-python-downloadsDisable automatic downloads of Python.
--offlineDisable network access.