fix: cannot parse INSTANCE_PYTHON_VERSION (#5874)

This commit is contained in:
pyranota
2025-06-05 16:56:30 +02:00
committed by GitHub
parent 445be72b23
commit a0b302d2c5
@@ -296,6 +296,7 @@ impl PyV {
) -> Self {
let mut err = None;
let pyv = match INSTANCE_PYTHON_VERSION.read().await.clone() {
Some(v) if &v == "default" => PyVAlias::default().into(),
Some(v) => pep440_rs::Version::from_str(&v).unwrap_or_else(|_| {
let v = PyVAlias::default().into();
err = Some(format!("\nCannot parse INSTANCE_PYTHON_VERSION ({:?}), fallback to latest_stable ({v:?})", *INSTANCE_PYTHON_VERSION));