mirror of
https://github.com/python/cpython.git
synced 2025-11-09 10:01:42 +00:00
[3.14] gh-133485: Use interpreters.Interpreter in InterpreterPoolExecutor (gh-135695)
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.
(cherry picked from commit 725da50520, AKA gh-133957)
Co-authored-by: Eric Snow <ericsnowcurrently@gmail.com>
This commit is contained in:
parent
c03f94e7fe
commit
bc8ed42176
5 changed files with 266 additions and 205 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue