This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients Oren Milman, brett.cannon, eric.snow, ncoghlan, serhiy.storchaka
Date 2017-09-13.01:55:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505267724.95.0.308546213888.issue31404@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-09-13 01:55:25ncoghlansetrecipients: + ncoghlan, brett.cannon, eric.snow, serhiy.storchaka, Oren Milman
2017-09-13 01:55:24ncoghlansetmessageid: <1505267724.95.0.308546213888.issue31404@psf.upfronthosting.co.za>
2017-09-13 01:55:24ncoghlanlinkissue31404 messages
2017-09-13 01:55:24ncoghlancreate