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 serhiy.storchaka
Recipients Guido.van.Rossum, Mark.Shannon, benjamin.peterson, eltoder, gvanrossum, larry, lemburg, njs, pitrou, rhettinger, serhiy.storchaka, vstinner
Date 2015-09-01.17:26:06
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441128366.89.0.475463085761.issue24912@psf.upfronthosting.co.za>
In-reply-to
Content
The c0d25de5919e changeset consists of three parts:

1) Fixes a bug (disallow an assignment of incompatible __class__ that happens to have the same __basesize__).
2) Allows __class__ assignment for module type.
3) Allows __class__ assignment for other types, in particular non-heap builtin types.

I think we should keep (1) and disallow (3). (2) is questionable and I for disallowing it too (special cases aren't special enough to break the rules). It is too little time left to 3.5 release, we will have more time to discuss this for 3.6.

Nataniel's new patch without special casing ModuleType would be good to me.
History
Date User Action Args
2015-09-01 17:26:06serhiy.storchakasetrecipients: + serhiy.storchaka, lemburg, gvanrossum, rhettinger, pitrou, vstinner, larry, benjamin.peterson, njs, Mark.Shannon, eltoder, Guido.van.Rossum
2015-09-01 17:26:06serhiy.storchakasetmessageid: <1441128366.89.0.475463085761.issue24912@psf.upfronthosting.co.za>
2015-09-01 17:26:06serhiy.storchakalinkissue24912 messages
2015-09-01 17:26:06serhiy.storchakacreate