]> granicus.if.org Git - python/commit
bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (#527)
authorNate <nate@so8r.es>
Wed, 15 Mar 2017 18:39:22 +0000 (11:39 -0700)
committerŁukasz Langa <lukasz@langa.pl>
Wed, 15 Mar 2017 18:39:22 +0000 (11:39 -0700)
commitbd583ef9857d99f9145ad0bb2c4424cc0baa63fc
treefd78d76afee6b79a286183628d2074978b3a8ad8
parentb4e9087e7b77e8f76feac76f9c1ab21b49c0c766
bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (#527)

Many metaclasses in the standard library don't play nice with
__init_subclass__. This bug makes ABCMeta in particular with
__init_subclass__, which is an 80/20 solution for me personally.
AFAICT, a general solution to this problem requires updating all
metaclasses in the standard library to make sure they pass **kwargs to
type.__new__, whereas this PR only fixes ABCMeta. For context, see
https://bugs.python.org/issue29581.

* added a test combining ABCMeta and __init_subclass__
* Added NEWS item
Lib/abc.py
Lib/test/test_abc.py
Misc/NEWS