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 Guido.van.Rossum, Mark.Shannon, benjamin.peterson, eltoder, gvanrossum, larry, lemburg, ncoghlan, njs, pitrou, rhettinger, serhiy.storchaka, vstinner
Date 2015-09-03.05:57:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1441259822.08.0.576222704393.issue24912@psf.upfronthosting.co.za>
In-reply-to
Content
I've reviewed the patch, and it looks good to me. Key additions:

* truly immutable types (instances of which may be cached) are now explicitly checked in the test suite to ensure they don't support __class__ assignment, even to a subclass

* the check for non-heaptypes in __class__ assignment has been restored, with a hardcoded whitelist to bypass that check. The only type on the whitelist for 3.5 is PyModuleType.

Thus, this patch will also serve to protect any extension types that were relying on the non-heaptype check to prevent __class__ assignment.

The patch also includes a long block comment before the restored check for non-heap types that explains the history and links out to this issue.
History
Date User Action Args
2015-09-03 05:57:02ncoghlansetrecipients: + ncoghlan, lemburg, gvanrossum, rhettinger, pitrou, vstinner, larry, benjamin.peterson, njs, Mark.Shannon, eltoder, serhiy.storchaka, Guido.van.Rossum
2015-09-03 05:57:02ncoghlansetmessageid: <1441259822.08.0.576222704393.issue24912@psf.upfronthosting.co.za>
2015-09-03 05:57:02ncoghlanlinkissue24912 messages
2015-09-03 05:57:01ncoghlancreate