ou were looking for. WARNING: Using this function to disable the check can lead to unexpected behavior and even crashes. It should only be used during extension module development. If "disable_check" is True then the compatibility check will not happen while the context manager is active. Otherwise the check *will* happen. Normally, extensions that do not support multiple interpreters may not be imported in a subinterpreter. That implies modules that do not implement multi-phase init or that explicitly of out. Likewise for modules import in a subinterpreter with its own GIL when the extension does not support a per-interpreter GIL. This implies the module does not have a Py_mod_multiple_interpreters slot set to Py_MOD_PER_INTERPRETER_GIL_SUPPORTED. In both cases, this context manager may be used to temporarily disable the check for compatible extension modules. You can get the same effect as this function by implementing the basic interface of multi-phase init (PEP 489) and lying about support for multiple interpreters (or per-interpreter GIL). c