Nick Coghlan added the comment:

Introducing sys.__modules__ doesn't solve the problem, since you'd be able to 
recreate the problems Oren reports just by messing with that as well as with 
sys.modules.

And we try reasonable hard to protect users from completely breaking the 
interpreter just by assigning nonsense to sys module attributes.

So my recommendation would be to revert #28411, and make it clearer that the 
purpose of the interpreter state attribute is to defend against nonsensical 
rebinding of sys.modules, and that it can't be removed unless/until the sys 
module is switched to a custom type that enforces type checks on some of its 
attributes.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue31404>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to