gh-76785: More Fixes for test.support.interpreters (gh-113012)

This brings the module (along with the associated extension modules) mostly in sync with PEP 734.  There are only a few small things to wrap up.
This commit is contained in:
Eric Snow 2023-12-12 10:43:30 -07:00 • committed by GitHub
parent cde1417175
commit a49b427b02
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 1899 additions and 88 deletions

View file

@ -273,6 +273,7 @@ PYTHONPATH=$(COREPYTHONPATH)
#_xxsubinterpreters _xxsubinterpretersmodule.c
#_xxinterpchannels _xxinterpchannelsmodule.c
#_xxinterpqueues _xxinterpqueuesmodule.c
#_xxtestfuzz _xxtestfuzz/_xxtestfuzz.c _xxtestfuzz/fuzzer.c
#_testbuffer _testbuffer.c
#_testinternalcapi _testinternalcapi.c

View file

@ -41,8 +41,11 @@
@MODULE__QUEUE_TRUE@_queue _queuemodule.c
@MODULE__RANDOM_TRUE@_random _randommodule.c
@MODULE__STRUCT_TRUE@_struct _struct.c
# build supports subinterpreters
@MODULE__XXSUBINTERPRETERS_TRUE@_xxsubinterpreters _xxsubinterpretersmodule.c
@MODULE__XXINTERPCHANNELS_TRUE@_xxinterpchannels _xxinterpchannelsmodule.c
@MODULE__XXINTERPQUEUES_TRUE@_xxinterpqueues _xxinterpqueuesmodule.c
@MODULE__ZONEINFO_TRUE@_zoneinfo _zoneinfo.c
# needs libm

View file

@ -2629,10 +2629,11 @@ _get_current_channelend_type(int end)
cls = state->recv_channel_type;
}
if (cls == NULL) {
PyObject *highlevel = PyImport_ImportModule("interpreters");
// Force the module to be loaded, to register the type.
PyObject *highlevel = PyImport_ImportModule("interpreters.channel");
if (highlevel == NULL) {
PyErr_Clear();
highlevel = PyImport_ImportModule("test.support.interpreters");
highlevel = PyImport_ImportModule("test.support.interpreters.channel");
if (highlevel == NULL) {
return NULL;
}

File diff suppressed because it is too large Load diff