-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Pickling an exception group with a cycle, like so...
import pickle
inner = Exception("Inner")
outer = ExceptionGroup("outer", [inner])
outer.exceptions[0].foo = outer
pickle.loads(pickle.dumps(outer))
...produces...
Traceback (most recent call last):
File "<stdin>", line 5, in <module>
ValueError: second argument (exceptions) must be a non-empty sequence
Maybe BaseExceptionGroup
needs a custom reducer that allows for two-phase initialization.
CPython versions tested on:
3.13
Operating systems tested on:
macOS
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
No status