This PR adds the ability to enable the GIL if it was disabled at
interpreter startup, and modifies the multi-phase module initialization
path to enable the GIL when loading a module, unless that module's spec
includes a slot indicating it can run safely without the GIL.
PEP 703 called the constant for the slot `Py_mod_gil_not_used`; I went
with `Py_MOD_GIL_NOT_USED` for consistency with gh-104148.
A warning will be issued up to once per interpreter for the first
GIL-using module that is loaded. If `-v` is given, a shorter message
will be printed to stderr every time a GIL-using module is loaded
(including the first one that issues a warning).
Here we are doing no more than adding the value for Py_mod_multiple_interpreters and using it for stdlib modules. We will start checking for it in gh-104206 (once PyInterpreterState.ceval.own_gil is added in gh-104204).
Add `MS_WINDOWS_DESKTOP`, `MS_WINDOWS_APPS`, `MS_WINDOWS_SYSTEM` and `MS_WINDOWS_GAMES` preprocessor definitions to allow switching off functionality missing from particular API partitions ("partitions" are used in Windows to identify overlapping subsets of APIs).
CPython only officially supports `MS_WINDOWS_DESKTOP` and `MS_WINDOWS_SYSTEM` (APPS is included by normal desktop builds, but APPS without DESKTOP is not covered). Other configurations are a convenience for people building their own runtimes.
`MS_WINDOWS_GAMES` is for the Xbox subset of the Windows API, which is also available on client OS, but is restricted compared to `MS_WINDOWS_DESKTOP`. These restrictions may change over time, as they relate to the build headers rather than the OS support, and so we assume that Xbox builds will use the latest available version of the GDK.
This works by not caching the handle and instead getting the handle from
the file descriptor each time, so that if the actual handle changes by
fd redirection closing/opening the console handle beneath our feet, we
will keep working correctly.
test_repl.test_close_stdin() now calls
support.suppress_msvcrt_asserts() to fix the test on Windows.
* Move suppress_msvcrt_asserts() from test.libregrtest.setup to
test.support. Make its verbose parameter optional: verbose=False by
default.
* Add msvcrt.GetErrorMode().
* SuppressCrashReport now uses GetErrorMode() and SetErrorMode() of
the msvcrt module, rather than using ctypes.
* Remove also an unused variable (deadline) in wait_process().
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78213 | martin.v.loewis | 2010-02-18 10:22:20 +0100 (Do, 18 Feb 2010) | 3 lines
Stop providing crtassem.h symbols when compiling with
Visual Studio 2010, as msvcr100.dll is not a platform
assembly anymore.
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r64214 | amaury.forgeotdarc | 2008-06-13 02:42:22 +0200 (ven., 13 juin 2008) | 6 lines
Restore support for Microsoft VC6 compiler.
Some functions in the msvcrt module are skipped,
and socket.ioctl is enabled only when using a more recent Platform SDK.
(and yes, there are still companies that use a 10-years old compiler)
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r59442 | georg.brandl | 2007-12-09 22:15:07 +0100 (Sun, 09 Dec 2007) | 5 lines
Two fixes in DocXMLRPCServer:
* remove parameter default that didn't make sense
* properly escape values in output
Thanks to Jeff Wheeler from GHOP!
........
r59444 | georg.brandl | 2007-12-09 23:38:26 +0100 (Sun, 09 Dec 2007) | 2 lines
Add Jeff Wheeler.
........
r59445 | georg.brandl | 2007-12-09 23:39:12 +0100 (Sun, 09 Dec 2007) | 2 lines
Add DocXMLRPCServer test from GHOP task #136, written by Jeff Wheeler.
........
r59447 | christian.heimes | 2007-12-10 16:12:41 +0100 (Mon, 10 Dec 2007) | 1 line
Added wide char api variants of getch and putch to msvcrt module. The wide char methods are required to fix#1578 in py3k. I figured out that they might be useful in 2.6, too.
........
r59448 | christian.heimes | 2007-12-10 16:39:09 +0100 (Mon, 10 Dec 2007) | 1 line
Stupid save all didn't safe it all ...
........