-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
bpo-29581: Make ABCMeta.__new__ pass **kwargs to type.__new__ #527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
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.
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA. This is necessary for legal reasons before we can look at your contribution. Please follow these steps to help rectify the issue:
Thanks again to your contribution and we look forward to looking at it! |
@Soares, thanks for your PR! By analyzing the history of the files in this pull request, we identified @benjaminp, @tiran, @ambv, @merwok and @doerwalter to be potential reviewers. |
@the-knights-who-say-ni thanks, I have now signed the CLA |
LGTM. Would you add NEWS entry for this? Maybe, it's like
|
@methane Done, thanks. (Let me know if I did it wrong.) |
Thanks! ✨ 🍰 ✨ |
…#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)
…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)
…#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)
…w__ (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 bd583ef) * [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 bd583ef) * **kwargs -> ``kwargs`` in attempts to fix the Travis build. * Quote the **kwargs
Bumps [pytest-aiohttp](https://github.com/aio-libs/pytest-aiohttp) from 1.0.3 to 1.0.4. - [Release notes](https://github.com/aio-libs/pytest-aiohttp/releases) - [Changelog](https://github.com/aio-libs/pytest-aiohttp/blob/master/CHANGES.rst) - [Commits](aio-libs/pytest-aiohttp@v1.0.3...v1.0.4) --- updated-dependencies: - dependency-name: pytest-aiohttp dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Mariatta Wijaya <[email protected]>
Many metaclasses in the standard library don't play nice with
__init_subclass__
. This bug makes ABCMeta in particular work with__init_subclass__
, though it doesn't address other metaclasses in the standard library. AFAICT, a general solution to this problem requires updating all metaclasses in the standard library to make sure they pass **kwargs totype.__new__
, whereas this PR only fixes ABCMeta. For context, see https://bugs.python.org/issue29581.