gh-133485: Use interpreters.Interpreter in InterpreterPoolExecutor (gh-133957)
Most importantly, this resolves the issues with functions and types defined in __main__. It also expands the number of supported objects and simplifies the implementation.
This commit is contained in:
@@ -674,7 +674,9 @@ _PyPickle_Loads(struct _unpickle_context *ctx, PyObject *pickled)
|
||||
|
||||
finally:
|
||||
if (exc != NULL) {
|
||||
sync_module_capture_exc(tstate, &ctx->main);
|
||||
if (_PyErr_Occurred(tstate)) {
|
||||
sync_module_capture_exc(tstate, &ctx->main);
|
||||
}
|
||||
// We restore the original exception.
|
||||
// It might make sense to chain it (__context__).
|
||||
_PyErr_SetRaisedException(tstate, exc);
|
||||
|
||||
Reference in New Issue
Block a user