[3.6] bpo-29581: Make __init_subclass__ work on ABCMeta type classes#1282
[3.6] bpo-29581: Make __init_subclass__ work on ABCMeta type classes#1282Mariatta merged 5 commits intopython:3.6from
Conversation
…#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 Note: I'm not sure I backported the NEWS changes correctly; I'm assuming that the cherry_picker tool merged everything corectly except for the explicit merge conflicts, but I'm not sure this is true. (cherry picked from commit bd583ef)
…ythonGH-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 bd583ef)
|
Sorry with the confusion of how to use cherry_picker.py. I suppose you were following the instruction here, which mentions about merging with Once you have cherry_picker.py you'll only need to do Hope this helps a bit :) If you want, I can do the backport for you later today. |
|
Nvm, I changed the base branch to |
|
Bump. What do I need to do to cause this backport to happen? |
|
Sorry this fell off my radar. |
|
Conflict resolved. Thanks! |
|
Travis build failed.. 🤔 |
Misc/NEWS
Outdated
| Library | ||
| ------- | ||
|
|
||
| - bpo-29581: ABCMeta.__new__ now accepts **kwargs, allowing abstract base |
There was a problem hiding this comment.
Instead of
**kwargs
, can you try
``kwargs``
That might fix it for travis.
|
Thanks 🎉 |
I'm not entirely sure that I used the cherry_pick tool correctly, please make sure that I didn't muck anything up.
I'm also planning to backport PR #678, which depends on this backport (of PR #527). I assume that I shouldn't begin that backport until this one is accepted, but let me know if I can begin cherry-picking #678 now.