[issue42935] Pickle can't import builtins at exit

2021-10-18 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> wont fix stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bu

[issue42935] Pickle can't import builtins at exit

2021-01-16 Thread Christian Heimes
Christian Heimes added the comment: At the end of a Python process, the interpreter is shut down in multiple steps. Object finalizers such as __del__ may be executed late in the interpreter shut down process. In your case, most of the interpreter is already gone. There isn't anything we can

[issue42935] Pickle can't import builtins at exit

2021-01-16 Thread Pete Wicken
Pete Wicken 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

[issue42935] Pickle can't import builtins at exit

2021-01-15 Thread Guido van Rossum
Guido van Rossum added the comment: I don’t know there is much we can do about this. I recommend using ‘with’ to close the shelf earlier. -- nosy: +gvanrossum ___ Python tracker _

[issue42935] Pickle can't import builtins at exit

2021-01-15 Thread Pete Wicken
New submission from Pete Wicken : Originally found as an issue in Lib/shelve.py; if we attempt to pickle a builtin as the program is exiting then Modules/_pickle.c will fail at the point of the PyImport_Import in save_global. In CPython3.8 this causes a segfault, in CPython3.9 a PicklingError