desktop: remove Python 3.10 from environment pickers

- version pickers in InstallComponents and AddExtensionSelector start at 3.11
- create_environment_from_requirements accepts 3.11 through 3.14 and falls
  back to 3.12 otherwise (previously 3.10 through 3.13)
- component tests select 3.11 instead of 3.10
This commit is contained in:
dlee-bq
2026-10-24 00:56:43 -07:00
parent fb29501161
commit e8459c6778
5 changed files with 12 additions and 12 deletions

View File

@@ -955,13 +955,13 @@ pub async fn create_environment_from_requirements_impl<F: FileSystem, E: EnvSyst
log::debug!("Detected Python version: {python_version}");
}
// Validate Python version is between 3.10 and 3.12 inclusive
// Validate Python version is between 3.11 and 3.14 inclusive
let python_major_minor: Vec<&str> = python_version.split('.').collect();
if python_major_minor.len() >= 2 {
let major: i32 = python_major_minor[0].parse().unwrap_or(3);
let minor: i32 = python_major_minor[1].parse().unwrap_or(11);
if major != 3 || !(10..=13).contains(&minor) {
if major != 3 || !(11..=14).contains(&minor) {
log::debug!("Python version {python_version} not supported. Using Python 3.12 instead");
python_version = "3.12".to_string();
}

View File

@@ -63,7 +63,7 @@ export const PythonVersionSelector = ({
return (
<div className="w-full" data-testid="python-version-selector">
<div className="flex flex-row gap-8 pr-20">
{["3.10", "3.11", "3.12", "3.13", "3.14"].map((version) => (
{["3.11", "3.12", "3.13", "3.14"].map((version) => (
<label
key={version}
className="flex items-center gap-2 cursor-pointer body-xs-regular text-theme-primary"

View File

@@ -70,7 +70,7 @@ export const PythonVersionSelector = ({
<p className="body-md-medium text-theme-primary mb-3">Select Python Version</p>
<div className="flex-1 items-center justify-between">
<div className="flex flex-row gap-8">
{["3.10", "3.11", "3.12", "3.13", "3.14"].map((version) => (
{["3.11", "3.12", "3.13", "3.14"].map((version) => (
<label
key={version}
className="flex items-center gap-2 cursor-pointer body-xs-regular text-theme-primary"

View File

@@ -43,11 +43,11 @@ test('PythonVersionSelector renders and handles version selection', () => {
render(<PythonVersionSelector onSelectVersion={onSelectVersion} />);
const python310Radio = screen.getByLabelText(/3.10/i);
fireEvent.click(python310Radio);
const python311Radio = screen.getByLabelText(/3.11/i);
fireEvent.click(python311Radio);
expect(onSelectVersion).toHaveBeenCalledWith('3.10');
expect(python310Radio).toBeChecked();
expect(onSelectVersion).toHaveBeenCalledWith('3.11');
expect(python311Radio).toBeChecked();
// The onNext prop and the next button are not part of the component, so we remove these assertions.
});

View File

@@ -61,11 +61,11 @@ test('PythonVersionSelector renders and handles version selection', () => {
expect(onSelectVersion).toHaveBeenCalledWith('3.13');
const python310Radio = screen.getByLabelText(/3.10/i);
fireEvent.click(python310Radio);
const python311Radio = screen.getByLabelText(/3.11/i);
fireEvent.click(python311Radio);
expect(onSelectVersion).toHaveBeenCalledWith('3.10');
expect(python310Radio).toBeChecked();
expect(onSelectVersion).toHaveBeenCalledWith('3.11');
expect(python311Radio).toBeChecked();
});
test('ExtensionSelector displays loading state initially', () => {