[issue1706] Force WINVER 0x0500 (Windows 2000)

Nick Coghlan report at bugs.python.org
Sat Feb 9 17:36:11 CET 2008


Nick Coghlan added the comment:

I just checked the current PC/pyconfig.h: with the current settings in
that file, the core is already limited to using NT4 compatible Win32 API
calls. Unless the specific source file takes steps to override it (i.e.
setting WINVER before including python.h), no Win2k or XP API calls
should be permitted outside the 64-bit builds (as those only became
possible with the advent of 64-bit support in XP, they set WINVER to
0x0501).

The reason this didn't avoid the Tcl/Tk problem is because the actual
setting of WINVER and _WIN32_WINNT is guarded by the Py_BUILD_CORE
preprocessor definition - which isn't set for separately built extension
modules like _tkinter.

Would setting these by default for extension modules (i.e. removing the
Py_BUILD_CORE guard) really be such a bad thing? The individual #ifdef
guards would still be there to allow extension module authors to
override it if they know what they're doing, but the default behaviour
would be to require that extension modules be compatible with every
version of Windows that that particular version of Python is compatible
with.

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1706>
__________________________________


More information about the Python-bugs-list mailing list