docs: correct stale 3.11 python-fallback comments to reference the default

The lockfile-less python fallback returns PyVAlias::default(), which moved
from 3.11 to 3.12 in #7405. Update the comments and the dedicated-worker
warn log to reference "the default version" instead of a hardcoded 3.11 so
they stay correct across future latest-stable bumps. No behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-07-08 09:25:39 +00:00
parent 0ba5a5e97f
commit b4e2dd4aa9
2 changed files with 3 additions and 3 deletions
@@ -3445,7 +3445,7 @@ pub async fn start_worker(
let py_version = if let Some(requirements) = requirements_o {
PyV::parse_from_requirements(&split_python_requirements(requirements.as_str()))
} else {
tracing::warn!(workspace_id = %w_id, "lockfile is empty for dedicated worker, thus python version cannot be inferred. Fallback to 3.11");
tracing::warn!(workspace_id = %w_id, "lockfile is empty for dedicated worker, thus python version cannot be inferred. Fallback to default python version");
PyVAlias::default().into()
};
@@ -372,10 +372,10 @@ impl PyV {
}
/// Parse lockfile for assigned python version.
/// If not found returns 3.11
/// If not found returns the default version (`PyVAlias::default()`).
pub fn parse_from_requirements<S: AsRef<str>>(requirements_lines: &[S]) -> Self {
Self::try_parse_from_requirements(requirements_lines).unwrap_or(
// If there is no assigned version in lockfile we automatically fallback to 3.11
// If there is no assigned version in lockfile we automatically fallback to the default version
// In this case we have dependencies or other metadata, but no associated python version
// This is the case for old deployed scripts
PyVAlias::default().into(),