gh-121596: Fix Sharing Interpreter Channels (gh-121597)

This fixes a mistake in gh-113012 and adds a test that verifies the fix.
This commit is contained in:
Eric Snow 2024-07-10 15:31:09 -06:00 committed by GitHub
parent 7641743d48
commit 35a67e36aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 20 additions and 2 deletions

View file

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