From PET repo:
Issue:
microsoft/python-environment-tools#261
New Tag:
VenvUv, // Virtual environments created with UV
normally its Venv
comes from the nativeLocator
pub struct PyVenvCfg {
pub version: String,
pub version_major: u64,
pub version_minor: u64,
pub prompt: Option<String>,
pub uv_version: Option<String>, // UV version if this was created by UV
}
parsing function
fn parse_uv_version(line: &str) -> Option<String> {
let trimmed = line.trim();
if trimmed.starts_with("uv") {
if let Some(eq_idx) = trimmed.find('=') {
let value = trimmed[eq_idx + 1..].trim();
if !value.is_empty() {
return Some(value.to_string());
}
}
}
None
}
Python Environments Extension Side
Setting:
introduce new setting python-envs.alwaysUseUv : boolean
default value: true
- This setting configures if
uv will be used to manage all virtual environments if set to true, or only manage those explicitly created by uv when set to false.
Adjust venv manager and pip (ie whenever uv is checked) to also check this setting. If its of type uv, always do it with uv, otherwise check the setting
From PET repo:
Issue:
microsoft/python-environment-tools#261
New Tag:
VenvUv, // Virtual environments created with UVnormally its
Venvcomes from the nativeLocator
parsing function
Python Environments Extension Side
Setting:
introduce new setting
python-envs.alwaysUseUv: booleandefault value:
trueuvwill be used to manage all virtual environments if set totrue, or only manage those explicitly created byuvwhen set tofalse.Adjust venv manager and pip (ie whenever uv is checked) to also check this setting. If its of type uv, always do it with uv, otherwise check the setting