File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,7 @@ struct _is {
123
123
// override for config->use_frozen_modules (for tests)
124
124
// (-1: "off", 1: "on", 0: no override)
125
125
int override_frozen_modules ;
126
+ int override_multi_interp_extensions_check ;
126
127
127
128
PyObject * codec_search_path ;
128
129
PyObject * codec_search_cache ;
Original file line number Diff line number Diff line change @@ -2400,7 +2400,9 @@ _PyImport_CheckSubinterpIncompatibleExtensionAllowed(const char *name)
2400
2400
{
2401
2401
PyInterpreterState * interp = _PyInterpreterState_Get ();
2402
2402
if (_PyInterpreterState_HasFeature (
2403
- interp , Py_RTFLAGS_MULTI_INTERP_EXTENSIONS )) {
2403
+ interp , Py_RTFLAGS_MULTI_INTERP_EXTENSIONS ) &&
2404
+ !interp -> override_multi_interp_extensions_check
2405
+ ) {
2404
2406
assert (!_Py_IsMainInterpreter (interp ));
2405
2407
PyErr_Format (PyExc_ImportError ,
2406
2408
"module %s does not support loading in subinterpreters" ,
You can’t perform that action at this time.
0 commit comments