Eric Snow added the comment: > I haven't finished reviewing PR 1638. I'm not sure that this change > is worth. It breaks a code that assumes that sys.module is a dict, > and I afraid it slows down importing. Maybe revert this change until > resolving all problems?
Yeah, I'm leaning that way myself. I'll take another look later today or tomorrow. FWIW, the likelihood of this causing problems to actual users is extremely low, so the urgency to fix this isn't high. Still, I don't want this to linger. As I said before, ideally we would prevent non-mappings from getting assigned to sys.modules. One alternative would be to introduce sys.__modules__ and fall back to it if sys.modules is invalid. ---------- nosy: +brett.cannon, ncoghlan _______________________________________ 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