summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Misc/NEWS2
-rw-r--r--PC/pyconfig.h8
-rw-r--r--PCbuild/build_tkinter.py6
-rw-r--r--Python/random.c33
-rw-r--r--Tools/buildbot/external-amd64.bat10
-rw-r--r--Tools/buildbot/external.bat8
6 files changed, 16 insertions, 51 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index f4ff543..3e4e86d 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -746,6 +746,8 @@ Tests
Build
-----
+- Drop support for Windows 2000.
+
- Issue #17029: Let h2py search the multiarch system include directory.
- Issue #16953: Fix socket module compilation on platforms with
diff --git a/PC/pyconfig.h b/PC/pyconfig.h
index 5025921..fb78bb9 100644
--- a/PC/pyconfig.h
+++ b/PC/pyconfig.h
@@ -156,15 +156,9 @@ WIN32 is still required for the locale module.
#endif /* MS_WIN64 */
/* set the version macros for the windows headers */
-#ifdef MS_WINX64
-/* 64 bit only runs on XP or greater */
+/* Python 3.4+ requires Windows XP or greater */
#define Py_WINVER 0x0501 /* _WIN32_WINNT_WINXP */
#define Py_NTDDI NTDDI_WINXP
-#else
-/* Python 2.6+ requires Windows 2000 or greater */
-#define Py_WINVER 0x0500 /* _WIN32_WINNT_WIN2K */
-#define Py_NTDDI NTDDI_WIN2KSP4
-#endif
/* 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
diff --git a/PCbuild/build_tkinter.py b/PCbuild/build_tkinter.py
index 4196cf3..9f08631 100644
--- a/PCbuild/build_tkinter.py
+++ b/PCbuild/build_tkinter.py
@@ -16,11 +16,7 @@ TK = "tk8.5.11"
TIX = "tix-8.4.3.x"
ROOT = os.path.abspath(os.path.join(here, par, par))
-# Windows 2000 compatibility: WINVER 0x0500
-# http://msdn2.microsoft.com/en-us/library/aa383745.aspx
-NMAKE = ('nmake /nologo /f %s '
- 'COMPILERFLAGS=\"-DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DNTDDI_VERSION=NTDDI_WIN2KSP4\" '
- '%s %s')
+NMAKE = ('nmake /nologo /f %s %s %s')
def nmake(makefile, command="", **kw):
defines = ' '.join(k+'='+str(v) for k, v in kw.items())
diff --git a/Python/random.c b/Python/random.c
index 53518c2..1ad4c3d 100644
--- a/Python/random.c
+++ b/Python/random.c
@@ -12,13 +12,6 @@ static int _Py_HashSecret_Initialized = 0;
#endif
#ifdef MS_WINDOWS
-typedef BOOL (WINAPI *CRYPTACQUIRECONTEXTA)(HCRYPTPROV *phProv,\
- LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType,\
- DWORD dwFlags );
-typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, DWORD dwLen,\
- BYTE *pbBuffer );
-
-static CRYPTGENRANDOM pCryptGenRandom = NULL;
/* This handle is never explicitly released. Instead, the operating
system will release it when the process terminates. */
static HCRYPTPROV hCryptProv = 0;
@@ -26,29 +19,9 @@ static HCRYPTPROV hCryptProv = 0;
static int
win32_urandom_init(int raise)
{
- HINSTANCE hAdvAPI32 = NULL;
- CRYPTACQUIRECONTEXTA pCryptAcquireContext = NULL;
-
- /* Obtain handle to the DLL containing CryptoAPI. This should not fail. */
- hAdvAPI32 = GetModuleHandle("advapi32.dll");
- if(hAdvAPI32 == NULL)
- goto error;
-
- /* Obtain pointers to the CryptoAPI functions. This will fail on some early
- versions of Win95. */
- pCryptAcquireContext = (CRYPTACQUIRECONTEXTA)GetProcAddress(
- hAdvAPI32, "CryptAcquireContextA");
- if (pCryptAcquireContext == NULL)
- goto error;
-
- pCryptGenRandom = (CRYPTGENRANDOM)GetProcAddress(hAdvAPI32,
- "CryptGenRandom");
- if (pCryptGenRandom == NULL)
- goto error;
-
/* Acquire context */
- if (! pCryptAcquireContext(&hCryptProv, NULL, NULL,
- PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
+ if (!CryptAcquireContext(&hCryptProv, NULL, NULL,
+ PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
goto error;
return 0;
@@ -77,7 +50,7 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
while (size > 0)
{
chunk = size > INT_MAX ? INT_MAX : size;
- if (!pCryptGenRandom(hCryptProv, chunk, buffer))
+ if (!CryptGenRandom(hCryptProv, chunk, buffer))
{
/* CryptGenRandom() failed */
if (raise)
diff --git a/Tools/buildbot/external-amd64.bat b/Tools/buildbot/external-amd64.bat
index d2ff255..a44c662 100644
--- a/Tools/buildbot/external-amd64.bat
+++ b/Tools/buildbot/external-amd64.bat
@@ -6,16 +6,16 @@ call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
if not exist tcltk64\bin\tcl85g.dll (
cd tcl-8.5.11.0\win
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install
+ nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all
+ nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install
cd ..\..
)
if not exist tcltk64\bin\tk85g.dll (
cd tk-8.5.11.0\win
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 clean
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 all
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 install
+ nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 clean
+ nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 all
+ nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 install
cd ..\..
)
diff --git a/Tools/buildbot/external.bat b/Tools/buildbot/external.bat
index ed5c10e..83b3861 100644
--- a/Tools/buildbot/external.bat
+++ b/Tools/buildbot/external.bat
@@ -7,15 +7,15 @@ call "%VS100COMNTOOLS%\vsvars32.bat"
if not exist tcltk\bin\tcl85g.dll (
@rem all and install need to be separate invocations, otherwise nmakehlp is not found on install
cd tcl-8.5.11.0\win
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk clean all
+ nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk clean all
nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk install
cd ..\..
)
if not exist tcltk\bin\tk85g.dll (
cd tk-8.5.11.0\win
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 clean
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 all
- nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 install
+ nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 clean
+ nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 all
+ nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 install
cd ..\..
)