Nick Coghlan added the comment: 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. ---------- nosy: +ncoghlan _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24912> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com