diff --git a/graphene/pyutils/init_subclass.py b/graphene/pyutils/init_subclass.py deleted file mode 100644 index 81198c9c0..000000000 --- a/graphene/pyutils/init_subclass.py +++ /dev/null @@ -1,23 +0,0 @@ -is_init_subclass_available = hasattr(object, "__init_subclass__") - -if not is_init_subclass_available: - - class InitSubclassMeta(type): - """Metaclass that implements PEP 487 protocol""" - - def __new__(cls, name, bases, ns, **kwargs): - __init_subclass__ = ns.pop("__init_subclass__", None) - if __init_subclass__: - __init_subclass__ = classmethod(__init_subclass__) - ns["__init_subclass__"] = __init_subclass__ - return super(InitSubclassMeta, cls).__new__(cls, name, bases, ns, **kwargs) - - def __init__(cls, name, bases, ns, **kwargs): - super(InitSubclassMeta, cls).__init__(name, bases, ns) - super_class = super(cls, cls) - if hasattr(super_class, "__init_subclass__"): - super_class.__init_subclass__.__func__(cls, **kwargs) - - -else: - InitSubclassMeta = type # type: ignore diff --git a/graphene/utils/subclass_with_meta.py b/graphene/utils/subclass_with_meta.py index 09f08a880..8900ad532 100644 --- a/graphene/utils/subclass_with_meta.py +++ b/graphene/utils/subclass_with_meta.py @@ -1,10 +1,9 @@ from inspect import isclass -from ..pyutils.init_subclass import InitSubclassMeta from .props import props -class SubclassWithMeta_Meta(InitSubclassMeta): +class SubclassWithMeta_Meta(type): _meta = None def __str__(cls):