diff options
author | Nate <nate@so8r.es> | 2017-06-07 00:31:03 (GMT) |
---|---|---|
committer | Mariatta <Mariatta@users.noreply.github.com> | 2017-06-07 00:31:03 (GMT) |
commit | 6fb12b5c43945f61f3da82e33eafb4ddae2296ee (patch) | |
tree | f93a4dd486df5795de6b73c06c959aad4aa3b4ac /Misc/NEWS | |
parent | 063f0b358331322d84f85008e6c01f80ff321fd6 (diff) | |
download | cpython-6fb12b5c43945f61f3da82e33eafb4ddae2296ee.zip cpython-6fb12b5c43945f61f3da82e33eafb4ddae2296ee.tar.gz cpython-6fb12b5c43945f61f3da82e33eafb4ddae2296ee.tar.bz2 |
bpo-29581: bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-527) (GH-1282)
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
(cherry picked from commit bd583ef9857d99f9145ad0bb2c4424cc0baa63fc)
* [3.6] bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ (GH-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.
(cherry picked from commit bd583ef9857d99f9145ad0bb2c4424cc0baa63fc)
* **kwargs -> ``kwargs`` in attempts to fix the Travis build.
* Quote the **kwargs
Diffstat (limited to 'Misc/NEWS')
-rw-r--r-- | Misc/NEWS | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -45,6 +45,9 @@ Core and Builtins Library ------- +- bpo-29581: ABCMeta.__new__ now accepts ``**kwargs``, allowing abstract base + classes to use keyword parameters in __init_subclass__. Patch by Nate Soares. + - bpo-30557: faulthandler now correctly filters and displays exception codes on Windows |