https://github.com/python/cpython/commit/01db0e404de0226f106dc674981f31a6df9c19bf
commit: 01db0e404de0226f106dc674981f31a6df9c19bf
branch: 3.12
author: Gregory P. Smith <[email protected]>
committer: Yhg1s <[email protected]>
date: 2024-08-06T18:53:32+02:00
summary:

[3.12] gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574) 
(#122677)

gh-122573: Require Python 3.10 or newer for Windows builds (GH-122574)

Match statements in tooling require a more recent Python. 
`Tools/cases_generator/*.py`

Co-authored-by: Jonathan Protzenko <[email protected]>
Co-authored-by: Erlend E. Aasland <[email protected]>

files:
A Misc/NEWS.d/next/Windows/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst
M PCbuild/find_python.bat

diff --git 
a/Misc/NEWS.d/next/Windows/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst 
b/Misc/NEWS.d/next/Windows/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst
new file mode 100644
index 00000000000000..5cc69e206debf5
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst
@@ -0,0 +1 @@
+The Windows build of CPython now requires 3.10 or newer.
diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat
index d3f62c93869003..d8c7cec15ef5fe 100644
--- a/PCbuild/find_python.bat
+++ b/PCbuild/find_python.bat
@@ -36,13 +36,15 @@
 @if "%_Py_EXTERNALS_DIR%"=="" (set _Py_EXTERNALS_DIR=%_Py_D%\..\externals)
 
 @rem If we have Python in externals, use that one
-@if exist "%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" 
("%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" -Ec "import sys; assert 
sys.version_info[:2] >= (3, 8)" >nul 2>nul) && (set 
PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") && (set 
_Py_Python_Source=found in externals directory) && goto :found || rmdir /Q /S 
"%_Py_EXTERNALS_DIR%\pythonx86"
+@if exist "%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" 
("%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" -Ec "import sys; assert 
sys.version_info[:2] >= (3, 10)" >nul 2>nul) && (set 
PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") && (set 
_Py_Python_Source=found in externals directory) && goto :found || rmdir /Q /S 
"%_Py_EXTERNALS_DIR%\pythonx86"
 
 @rem If HOST_PYTHON is recent enough, use that
-@if NOT "%HOST_PYTHON%"=="" @%HOST_PYTHON% -Ec "import sys; assert 
sys.version_info[:2] >= (3, 9)" >nul 2>nul && (set PYTHON="%HOST_PYTHON%") && 
(set _Py_Python_Source=found as HOST_PYTHON) && goto :found
+@if NOT "%HOST_PYTHON%"=="" @%HOST_PYTHON% -Ec "import sys; assert 
sys.version_info[:2] >= (3, 10)" >nul 2>nul && (set PYTHON="%HOST_PYTHON%") && 
(set _Py_Python_Source=found as HOST_PYTHON) && goto :found
 
 @rem If py.exe finds a recent enough version, use that one
-@for %%p in (3.11 3.10 3.9) do @py -%%p -EV >nul 2>&1 && (set PYTHON=py -%%p) 
&& (set _Py_Python_Source=found %%p with py.exe) && goto :found
+@rem It is fine to add new versions to this list when they have released,
+@rem but we do not use prerelease builds here.
+@for %%p in (3.12 3.11 3.10) do @py -%%p -EV >nul 2>&1 && (set PYTHON=py -%%p) 
&& (set _Py_Python_Source=found %%p with py.exe) && goto :found
 
 @if NOT exist "%_Py_EXTERNALS_DIR%" mkdir "%_Py_EXTERNALS_DIR%"
 @set _Py_NUGET=%NUGET%

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to