bpo-43827: Make arguments to abc.ABCMeta.__new__ pos-only (#25385)

To avoid conflicts with `__init__subclass__`.
This commit is contained in:
Vlad Hoi 2022-05-05 16:40:01 +03:00 committed by GitHub
parent a95138b2c5
commit 42fee931d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 1 deletions

View file

@ -102,7 +102,7 @@ else:
implementations defined by the registering ABC be callable (not
even via super()).
"""
def __new__(mcls, name, bases, namespace, **kwargs):
def __new__(mcls, name, bases, namespace, /, **kwargs):
cls = super().__new__(mcls, name, bases, namespace, **kwargs)
_abc_init(cls)
return cls