Skip to content

Commit fac5e7a

Browse files
authored
gh-124487: Require at least Windows 10 SDK and update install check (GH-124672)
1 parent 077e7ef commit fac5e7a

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Increases Windows required OS and API level to Windows 10.

PC/pyconfig.h.in

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -169,9 +169,9 @@ WIN32 is still required for the locale module.
169169
#endif /* MS_WIN64 */
170170

171171
/* set the version macros for the windows headers */
172-
/* Python 3.9+ requires Windows 8 or greater */
173-
#define Py_WINVER 0x0602 /* _WIN32_WINNT_WIN8 */
174-
#define Py_NTDDI NTDDI_WIN8
172+
/* Python 3.13+ requires Windows 10 or greater */
173+
#define Py_WINVER 0x0A00 /* _WIN32_WINNT_WIN10 */
174+
#define Py_NTDDI NTDDI_WIN10
175175

176176
/* We only set these values when building Python - we don't want to force
177177
these values on extensions, as that will affect the prototypes and

Tools/msi/bundle/Default.wxl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ Feel free to post at <a href="https://discuss.python.org/c/users/7">discus
123123
<String Id="FailureRestartText">You must restart your computer to complete the rollback of the software.</String>
124124
<String Id="FailureRestartButton">&amp;Restart</String>
125125
<String Id="FailureExistingInstall">Unable to install [WixBundleName] due to an existing install. Use Programs and Features to modify, repair or remove [WixBundleName].</String>
126-
<String Id="FailureOldOS">At least Windows 8.1 or Windows Server 2012 are required to install [WixBundleName]
126+
<String Id="FailureOldOS">At least Windows 10 or Windows Server 2016 are required to install [WixBundleName]
127127

128128
Visit &lt;a href="https://www.python.org/downloads/"&gt;python.org&lt;/a&gt; to download an earlier version of Python.</String>
129129
<String Id="SuccessMaxPathButton">Disable path length limit</String>

Tools/msi/bundle/bootstrap/PythonBootstrapperApplication.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3086,11 +3086,13 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
30863086
LOC_STRING *pLocString = nullptr;
30873087

30883088
if (IsWindowsServer()) {
3089-
if (IsWindowsVersionOrGreater(6, 2, 0)) {
3090-
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2012 or later");
3089+
if (IsWindowsVersionOrGreater(10, 0, 0)) {
3090+
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows Server 2016 or later");
30913091
return;
3092+
} else if (IsWindowsVersionOrGreater(6, 2, 0)) {
3093+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2012");
30923094
} else if (IsWindowsVersionOrGreater(6, 1, 1)) {
3093-
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Detected Windows Server 2008 R2");
3095+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
30943096
} else if (IsWindowsVersionOrGreater(6, 1, 0)) {
30953097
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows Server 2008 R2");
30963098
} else if (IsWindowsVersionOrGreater(6, 0, 0)) {
@@ -3104,8 +3106,7 @@ class PythonBootstrapperApplication : public CBalBaseBootstrapperApplication {
31043106
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 10 or later");
31053107
return;
31063108
} else if (IsWindows8Point1OrGreater()) {
3107-
BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Target OS is Windows 8.1");
3108-
return;
3109+
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 8.1");
31093110
} else if (IsWindows8OrGreater()) {
31103111
BalLog(BOOTSTRAPPER_LOG_LEVEL_ERROR, "Detected Windows 8");
31113112
} else if (IsWindows7OrGreater()) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy