[issue42935] Pickle can't import builtins at exit

Pete Wicken report at bugs.python.org
Sat Jan 16 08:38:40 EST 2021


Pete Wicken <petewicken at gmail.com> added the comment:

Out of curiosity, why is there not much we can do? I'm not familiar enough with Python's C code to appreciate the difficulty of making the builtins available at the point where the pickle save is run when exiting. The fact that this segfaults in the 3.8 version tested was rather concerning.

Shelve's implementation without the context manager was how we found the original bug; but it feels the way pickle handles this should be a lot safer.

Some clarification might help me craft a warning for the documentation if there is nothing that can be done in the code base.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42935>
_______________________________________


More information about the Python-bugs-list mailing list