Staging
v0.5.0
https://github.com/python/cpython
Revision 19d246745d9d013c12e9560dd020d778381780fb authored by Nick Coghlan on 05 December 2016, 06:47:55 UTC, committed by Nick Coghlan on 05 December 2016, 06:47:55 UTC
Handling zero-argument super() in __init_subclass__ and
__set_name__ involved moving __class__ initialisation to
type.__new__. This requires cooperation from custom
metaclasses to ensure that the new __classcell__ entry
is passed along appropriately.

The initial implementation of that change resulted in abruptly
broken zero-argument super() support in metaclasses that didn't
adhere to the new requirements (such as Django's metaclass for
Model definitions).

The updated approach adopted here instead emits a deprecation
warning for those cases, and makes them work the same way they
did in Python 3.5.

This patch also improves the related class machinery documentation
to cover these details and to include more reader-friendly
cross-references and index entries.
1 parent 71c62e1
History
Tip revision: 19d246745d9d013c12e9560dd020d778381780fb authored by Nick Coghlan on 05 December 2016, 06:47:55 UTC
Issue #23722: improve __classcell__ compatibility
Tip revision: 19d2467
File Mode Size
.github
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Programs
Python
Tools
.bzrignore -rw-r--r-- 582 bytes
.gitignore -rw-r--r-- 1.3 KB
.hgeol -rw-r--r-- 996 bytes
.hgignore -rw-r--r-- 1.3 KB
.hgtags -rw-r--r-- 8.4 KB
.hgtouch -rw-r--r-- 1.3 KB
LICENSE -rw-r--r-- 12.5 KB
Makefile.pre.in -rw-r--r-- 57.5 KB
README -rw-r--r-- 8.2 KB
aclocal.m4 -rw-r--r-- 10.7 KB
config.guess -rwxr-xr-x 41.9 KB
config.sub -rwxr-xr-x 34.9 KB
configure -rwxr-xr-x 470.8 KB
configure.ac -rw-r--r-- 154.9 KB
install-sh -rwxr-xr-x 7.0 KB
pyconfig.h.in -rw-r--r-- 40.3 KB
setup.py -rw-r--r-- 98.7 KB

README

back to top