cpython/Lib/importlib
Nick Coghlan 19d246745d Issue #23722: improve __classcell__ compatibility
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.
2016-12-05 16:47:55 +10:00
..
__init__.py Issue #24192: Fix namespace package imports. 2015-05-15 21:54:59 -06:00
_bootstrap.py Issue #28026: Raise ImportError when exec_module() exists but create_module() is missing. 2016-09-08 11:12:31 -07:00
_bootstrap_external.py Issue #23722: improve __classcell__ compatibility 2016-12-05 16:47:55 +10:00
abc.py Issue #26186: Remove an invalid type check in 2016-02-20 18:35:41 -08:00
machinery.py Issue #23911: Move path-based bootstrap code to a separate frozen module. 2015-05-02 19:15:18 -06:00
util.py Issue #26186: Remove the restriction that built-in and extension 2016-06-25 10:58:17 -07:00