From 1fbf4e91220c51e5ac1c07e693b17070f63d37b5 Mon Sep 17 00:00:00 2001 From: Jonathan Protzenko Date: Tue, 23 Jul 2024 14:15:28 -0400 Subject: [PATCH 1/5] Match statements in opcode need more recent Python --- PCbuild/find_python.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat index af85f6d362466e..280a1b618be86f 100644 --- a/PCbuild/find_python.bat +++ b/PCbuild/find_python.bat @@ -42,12 +42,12 @@ @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" @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 @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 3.9) do @py -%%p -EV >nul 2>&1 && (set PYTHON=py -%%p) && (set _Py_Python_Source=found %%p with py.exe) && goto :found +@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% From 2b21a05eb81c61654c3198a82114fed4ca9d67dd Mon Sep 17 00:00:00 2001 From: Jonathan Protzenko Date: Thu, 1 Aug 2024 10:55:18 -0700 Subject: [PATCH 2/5] NEWS --- .../next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst diff --git a/Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst b/Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst new file mode 100644 index 00000000000000..0718506245ad8f --- /dev/null +++ b/Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst @@ -0,0 +1,2 @@ +The Windows build of CPython now requires 3.10 as a minimum version, because +of the use of match case statements within the code of Python itself. From d55e95d0a3040d7b1a326d36e1aaba4a9b072661 Mon Sep 17 00:00:00 2001 From: Jonathan Protzenko Date: Thu, 1 Aug 2024 11:37:47 -0700 Subject: [PATCH 3/5] Another missing one --- PCbuild/find_python.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat index 280a1b618be86f..6db579fa8de08a 100644 --- a/PCbuild/find_python.bat +++ b/PCbuild/find_python.bat @@ -39,7 +39,7 @@ @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, 10)" >nul 2>nul && (set PYTHON="%HOST_PYTHON%") && (set _Py_Python_Source=found as HOST_PYTHON) && goto :found From 447e15f7d3dd9e4206d799ef86e19eec906b4208 Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sun, 4 Aug 2024 15:56:46 -0700 Subject: [PATCH 4/5] Update news wording. Co-authored-by: Erlend E. Aasland --- .../next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst b/Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst index 0718506245ad8f..5cc69e206debf5 100644 --- a/Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst +++ b/Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst @@ -1,2 +1 @@ -The Windows build of CPython now requires 3.10 as a minimum version, because -of the use of match case statements within the code of Python itself. +The Windows build of CPython now requires 3.10 or newer. From 6416baa07b7571dbfeac124296cc1f509f63750b Mon Sep 17 00:00:00 2001 From: "Gregory P. Smith" Date: Sun, 4 Aug 2024 15:58:01 -0700 Subject: [PATCH 5/5] Move the NEWS entry from Build to Windows. --- .../2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Misc/NEWS.d/next/{Build => Windows}/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst (100%) diff --git a/Misc/NEWS.d/next/Build/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 similarity index 100% rename from Misc/NEWS.d/next/Build/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst rename to Misc/NEWS.d/next/Windows/2024-08-01-10-55-15.gh-issue-122573.4-UCFY.rst