From 405acc5df0cd1c6c16c3e38ad20e0d151f55a816 Mon Sep 17 00:00:00 2001 From: Stella Huang false Date: Thu, 7 Dec 2023 12:08:50 -0800 Subject: [PATCH 1/2] add python 312 support --- Python/Product/Common/Parsing/PythonLanguageVersion.cs | 1 + .../Product/EnvironmentsList/ConfigurationExtension.xaml.cs | 4 +++- .../PythonTools/Environments/AddCondaEnvironmentControl.xaml | 2 ++ .../PythonTools/Environments/AddExistingEnvironmentView.cs | 4 +++- Python/Tests/Utilities.Python.Analysis/PythonPaths.cs | 4 ++++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Python/Product/Common/Parsing/PythonLanguageVersion.cs b/Python/Product/Common/Parsing/PythonLanguageVersion.cs index bfbb12f13e..36247d1c6c 100644 --- a/Python/Product/Common/Parsing/PythonLanguageVersion.cs +++ b/Python/Product/Common/Parsing/PythonLanguageVersion.cs @@ -43,6 +43,7 @@ public enum PythonLanguageVersion { V39 = 0x0309, V310 = 0x030a, V311 = 0x030b, + V312 = 0x030c, } public static class PythonLanguageVersionExtensions { diff --git a/Python/Product/EnvironmentsList/ConfigurationExtension.xaml.cs b/Python/Product/EnvironmentsList/ConfigurationExtension.xaml.cs index 173b181664..c9888be980 100644 --- a/Python/Product/EnvironmentsList/ConfigurationExtension.xaml.cs +++ b/Python/Product/EnvironmentsList/ConfigurationExtension.xaml.cs @@ -332,7 +332,9 @@ sealed class ConfigurationEnvironmentView : INotifyPropertyChanged { "3.7", "3.8", "3.9", - "3.10" + "3.10", + "3.11", + "3.12" }; private readonly EnvironmentView _view; diff --git a/Python/Product/PythonTools/PythonTools/Environments/AddCondaEnvironmentControl.xaml b/Python/Product/PythonTools/PythonTools/Environments/AddCondaEnvironmentControl.xaml index 9b76693708..4325740139 100644 --- a/Python/Product/PythonTools/PythonTools/Environments/AddCondaEnvironmentControl.xaml +++ b/Python/Product/PythonTools/PythonTools/Environments/AddCondaEnvironmentControl.xaml @@ -87,6 +87,8 @@ + + diff --git a/Python/Product/PythonTools/PythonTools/Environments/AddExistingEnvironmentView.cs b/Python/Product/PythonTools/PythonTools/Environments/AddExistingEnvironmentView.cs index 24aa92fc90..790b5a4b95 100644 --- a/Python/Product/PythonTools/PythonTools/Environments/AddExistingEnvironmentView.cs +++ b/Python/Product/PythonTools/PythonTools/Environments/AddExistingEnvironmentView.cs @@ -56,7 +56,9 @@ ProjectView selectedProject "3.7", "3.8", "3.9", - "3.10" + "3.10", + "3.11", + "3.12" }; public static readonly DependencyProperty InterpretersProperty = diff --git a/Python/Tests/Utilities.Python.Analysis/PythonPaths.cs b/Python/Tests/Utilities.Python.Analysis/PythonPaths.cs index 41432e43d2..d3f097724e 100644 --- a/Python/Tests/Utilities.Python.Analysis/PythonPaths.cs +++ b/Python/Tests/Utilities.Python.Analysis/PythonPaths.cs @@ -46,6 +46,8 @@ public class PythonPaths { public static readonly PythonVersion Python38 = GetCPythonVersion(PythonLanguageVersion.V38, InterpreterArchitecture.x86); public static readonly PythonVersion Python39 = GetCPythonVersion(PythonLanguageVersion.V39, InterpreterArchitecture.x86); public static readonly PythonVersion Python310 = GetCPythonVersion(PythonLanguageVersion.V310, InterpreterArchitecture.x86); + public static readonly PythonVersion Python311 = GetCPythonVersion(PythonLanguageVersion.V311, InterpreterArchitecture.x86); + public static readonly PythonVersion Python312 = GetCPythonVersion(PythonLanguageVersion.V312, InterpreterArchitecture.x86); public static readonly PythonVersion Python27_x64 = GetCPythonVersion(PythonLanguageVersion.V27, InterpreterArchitecture.x64); public static readonly PythonVersion Python35_x64 = GetCPythonVersion(PythonLanguageVersion.V35, InterpreterArchitecture.x64); public static readonly PythonVersion Python36_x64 = GetCPythonVersion(PythonLanguageVersion.V36, InterpreterArchitecture.x64); @@ -53,6 +55,8 @@ public class PythonPaths { public static readonly PythonVersion Python38_x64 = GetCPythonVersion(PythonLanguageVersion.V38, InterpreterArchitecture.x64); public static readonly PythonVersion Python39_x64 = GetCPythonVersion(PythonLanguageVersion.V39, InterpreterArchitecture.x64); public static readonly PythonVersion Python310_x64 = GetCPythonVersion(PythonLanguageVersion.V310, InterpreterArchitecture.x64); + public static readonly PythonVersion Python311_x64 = GetCPythonVersion(PythonLanguageVersion.V311, InterpreterArchitecture.x64); + public static readonly PythonVersion Python312_x64 = GetCPythonVersion(PythonLanguageVersion.V312, InterpreterArchitecture.x64); public static readonly PythonVersion Anaconda27 = GetAnacondaVersion(PythonLanguageVersion.V27, InterpreterArchitecture.x86); public static readonly PythonVersion Anaconda27_x64 = GetAnacondaVersion(PythonLanguageVersion.V27, InterpreterArchitecture.x64); public static readonly PythonVersion Anaconda36 = GetAnacondaVersion(PythonLanguageVersion.V36, InterpreterArchitecture.x86); From 45f1ec11a2579571113e1fa0cddc3a95b2c09f69 Mon Sep 17 00:00:00 2001 From: Stella Huang false Date: Thu, 7 Dec 2023 12:08:50 -0800 Subject: [PATCH 2/2] add python 312 support --- Python/Product/Common/Parsing/PythonLanguageVersion.cs | 1 + .../Product/EnvironmentsList/ConfigurationExtension.xaml.cs | 4 +++- .../PythonTools/Environments/AddCondaEnvironmentControl.xaml | 2 ++ .../PythonTools/Environments/AddExistingEnvironmentView.cs | 4 +++- Python/Tests/Utilities.Python.Analysis/PythonPaths.cs | 4 ++++ 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Python/Product/Common/Parsing/PythonLanguageVersion.cs b/Python/Product/Common/Parsing/PythonLanguageVersion.cs index bfbb12f13e..36247d1c6c 100644 --- a/Python/Product/Common/Parsing/PythonLanguageVersion.cs +++ b/Python/Product/Common/Parsing/PythonLanguageVersion.cs @@ -43,6 +43,7 @@ public enum PythonLanguageVersion { V39 = 0x0309, V310 = 0x030a, V311 = 0x030b, + V312 = 0x030c, } public static class PythonLanguageVersionExtensions { diff --git a/Python/Product/EnvironmentsList/ConfigurationExtension.xaml.cs b/Python/Product/EnvironmentsList/ConfigurationExtension.xaml.cs index 173b181664..c9888be980 100644 --- a/Python/Product/EnvironmentsList/ConfigurationExtension.xaml.cs +++ b/Python/Product/EnvironmentsList/ConfigurationExtension.xaml.cs @@ -332,7 +332,9 @@ sealed class ConfigurationEnvironmentView : INotifyPropertyChanged { "3.7", "3.8", "3.9", - "3.10" + "3.10", + "3.11", + "3.12" }; private readonly EnvironmentView _view; diff --git a/Python/Product/PythonTools/PythonTools/Environments/AddCondaEnvironmentControl.xaml b/Python/Product/PythonTools/PythonTools/Environments/AddCondaEnvironmentControl.xaml index 9b76693708..4325740139 100644 --- a/Python/Product/PythonTools/PythonTools/Environments/AddCondaEnvironmentControl.xaml +++ b/Python/Product/PythonTools/PythonTools/Environments/AddCondaEnvironmentControl.xaml @@ -87,6 +87,8 @@ + + diff --git a/Python/Product/PythonTools/PythonTools/Environments/AddExistingEnvironmentView.cs b/Python/Product/PythonTools/PythonTools/Environments/AddExistingEnvironmentView.cs index 24aa92fc90..790b5a4b95 100644 --- a/Python/Product/PythonTools/PythonTools/Environments/AddExistingEnvironmentView.cs +++ b/Python/Product/PythonTools/PythonTools/Environments/AddExistingEnvironmentView.cs @@ -56,7 +56,9 @@ ProjectView selectedProject "3.7", "3.8", "3.9", - "3.10" + "3.10", + "3.11", + "3.12" }; public static readonly DependencyProperty InterpretersProperty = diff --git a/Python/Tests/Utilities.Python.Analysis/PythonPaths.cs b/Python/Tests/Utilities.Python.Analysis/PythonPaths.cs index 41432e43d2..d3f097724e 100644 --- a/Python/Tests/Utilities.Python.Analysis/PythonPaths.cs +++ b/Python/Tests/Utilities.Python.Analysis/PythonPaths.cs @@ -46,6 +46,8 @@ public class PythonPaths { public static readonly PythonVersion Python38 = GetCPythonVersion(PythonLanguageVersion.V38, InterpreterArchitecture.x86); public static readonly PythonVersion Python39 = GetCPythonVersion(PythonLanguageVersion.V39, InterpreterArchitecture.x86); public static readonly PythonVersion Python310 = GetCPythonVersion(PythonLanguageVersion.V310, InterpreterArchitecture.x86); + public static readonly PythonVersion Python311 = GetCPythonVersion(PythonLanguageVersion.V311, InterpreterArchitecture.x86); + public static readonly PythonVersion Python312 = GetCPythonVersion(PythonLanguageVersion.V312, InterpreterArchitecture.x86); public static readonly PythonVersion Python27_x64 = GetCPythonVersion(PythonLanguageVersion.V27, InterpreterArchitecture.x64); public static readonly PythonVersion Python35_x64 = GetCPythonVersion(PythonLanguageVersion.V35, InterpreterArchitecture.x64); public static readonly PythonVersion Python36_x64 = GetCPythonVersion(PythonLanguageVersion.V36, InterpreterArchitecture.x64); @@ -53,6 +55,8 @@ public class PythonPaths { public static readonly PythonVersion Python38_x64 = GetCPythonVersion(PythonLanguageVersion.V38, InterpreterArchitecture.x64); public static readonly PythonVersion Python39_x64 = GetCPythonVersion(PythonLanguageVersion.V39, InterpreterArchitecture.x64); public static readonly PythonVersion Python310_x64 = GetCPythonVersion(PythonLanguageVersion.V310, InterpreterArchitecture.x64); + public static readonly PythonVersion Python311_x64 = GetCPythonVersion(PythonLanguageVersion.V311, InterpreterArchitecture.x64); + public static readonly PythonVersion Python312_x64 = GetCPythonVersion(PythonLanguageVersion.V312, InterpreterArchitecture.x64); public static readonly PythonVersion Anaconda27 = GetAnacondaVersion(PythonLanguageVersion.V27, InterpreterArchitecture.x86); public static readonly PythonVersion Anaconda27_x64 = GetAnacondaVersion(PythonLanguageVersion.V27, InterpreterArchitecture.x64); public static readonly PythonVersion Anaconda36 = GetAnacondaVersion(PythonLanguageVersion.V36, InterpreterArchitecture.x86);