[issue19255] Don't "wipe" builtins at shutdown

Serhiy Storchaka report at bugs.python.org
Mon Feb 10 17:12:22 CET 2014


Serhiy Storchaka added the comment:

Here is backported to 3.3 patch. It includes:

1. Operates not with sys.modules['builtins'].__dict__ and sys.modules['sys'].__dict__, but with cached interp->builtins and interp->sysdict, because sys.modules['builtins'] and sys.modules['sys'] can be changed, but builtins and standard streams for builtins are retrieved from cached interp->builtins and interp->sysdict.

2. interp->builtins is restored to saved copy.

3. Backported test. Actually it passed with current code, but can prevent future bugs.

I'm not sure about (2), but may be (1) should be applied.

----------
Added file: http://bugs.python.org/file34022/modules_cleanup-3.3.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19255>
_______________________________________


More information about the Python-bugs-list mailing list