]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-124487: Require at least Windows 10 SDK and update install check (GH-124672)
authorSteve Dower <steve.dower@python.org>
Mon, 30 Sep 2024 17:50:46 +0000 (18:50 +0100)
committerGitHub <noreply@github.com>
Mon, 30 Sep 2024 17:50:46 +0000 (18:50 +0100)
Misc/NEWS.d/next/Windows/2024-09-27-15-07-30.gh-issue-124487.7LrwHC.rst [new file with mode: 0644]
PC/pyconfig.h.in
Tools/msi/bundle/Default.wxl
Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

diff --git a/Misc/NEWS.d/next/Windows/2024-09-27-15-07-30.gh-issue-124487.7LrwHC.rst b/Misc/NEWS.d/next/Windows/2024-09-27-15-07-30.gh-issue-124487.7LrwHC.rst
new file mode 100644 (file)
index 0000000..93fb68d
--- /dev/null
@@ -0,0 +1 @@
+Increases Windows required OS and API level to Windows 10.
index 503f3193e2803ebe2d60707442fab0cc70c701a0..010f5fe56466303c034030f82ec95931ea782c16 100644 (file)
@@ -169,9 +169,9 @@ WIN32 is still required for the locale module.
 #endif /* MS_WIN64 */
 
 /* set the version macros for the windows headers */
-/* Python 3.9+ requires Windows 8 or greater */
-#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */
-#define Py_NTDDI NTDDI_WIN8
+/* Python 3.13+ requires Windows 10 or greater */
+#define Py_WINVER 0x0A00 /* _WIN32_WINNT_WIN10 */
+#define Py_NTDDI NTDDI_WIN10
 
 /* We only set these values when building Python - we don't want to force
    these values on extensions, as that will affect the prototypes and
index 0014204e89d1bb7fbff1fe1ba22c3090118f0ffa..49f681d3e11d2e4ff4beb918501f25ac377bfe0d 100644 (file)
@@ -123,7 +123,7 @@ Feel free to post at &lt;a href="https://discuss.python.org/c/users/7"&gt;discus
   <String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
   <String Id="FailureRestartButton">&amp;Restart</String>
   <String Id="FailureExistingInstall">Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName].</String>
-  <String Id="FailureOldOS">At least Windows 8.1 or Windows Server 2012 are required to install [WixBundleName]
+  <String Id="FailureOldOS">At least Windows 10 or Windows Server 2016 are required to install [WixBundleName]
 
 Visit &lt;a href="https://www.python.org/downloads/"&gt;python.org&lt;/a&gt; to download an earlier version of Python.</String>
   <String Id="SuccessMaxPathButton">Disable path length limit</String>
index 094ddba4f1ad8f7fccbf803a8ef1406fc5eb6caf..6f50200dc7b251bdba5b12449fab86628f938d75 100644 (file)
@@ -3086,11 +3086,13 @@ private:
         LOC_STRING *pLocString = nullptr;
         
         if (IsWindowsServer()) {
-            if (IsWindowsVersionOrGreater(6, 2, 0)) {
-                BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2012 or later");
+            if (IsWindowsVersionOrGreater(10, 0, 0)) {
+                BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2016 or later");
                 return;
+            } else if (IsWindowsVersionOrGreater(6, 2, 0)) {
+                BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2012");
             } else if (IsWindowsVersionOrGreater(6, 1, 1)) {
-                BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Detected Windows Server 2008 R2");
+                BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
             } else if (IsWindowsVersionOrGreater(6, 1, 0)) {
                 BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
             } else if (IsWindowsVersionOrGreater(6, 0, 0)) {
@@ -3104,8 +3106,7 @@ private:
                 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 10 or later");
                 return;
             } else if (IsWindows8Point1OrGreater()) {
-                BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 8.1");
-                return;
+                BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 8.1");
             } else if (IsWindows8OrGreater()) {
                 BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 8");
             } else if (IsWindows7OrGreater()) {