◐ Shell
clean mode source ↗

Message 249484 - Python tracker

I don't want to own this, but this is absolutely a release blocker. I see three ways out:

- Fix it right (if possible) -- "system immutable" types such as int should not allow __class__ assignment. Risk: there might be other cases (the code being patched is clearly too complex for humans to comprehend).

- Roll back the patch; I'm unclear on why Nathaniel would be so heartbroken if he couldn't assign the __class__ of a module (since there are other approaches such as assignment to sys.module[__name__].

- Roll back the patch but replace it with a narrower patch that specifically allows __class__ assignment for modules (but not for other types).

But first, why is it so important to assign the __class__ of a module?  It seems somebody is trying to make modules into what they weren't meant to be.