Commit 5430b81e authored by Stefan Behnel's avatar Stefan Behnel

use correct metaclass when patching Coroutine into collections.abc module

parent b9e0bdcf
...@@ -1215,14 +1215,18 @@ _module.Generator = mk_gen() ...@@ -1215,14 +1215,18 @@ _module.Generator = mk_gen()
#ifdef __Pyx_Coroutine_USED #ifdef __Pyx_Coroutine_USED
CSTRING("""\ CSTRING("""\
def mk_coroutine(): def mk_coroutine():
from abc import abstractmethod from abc import abstractmethod, ABCMeta
""") """)
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
" class Coroutine(metaclass=_module.ABCMeta):\n" CSTRING("""\
class Coroutine(metaclass=ABCMeta):
""")
#else #else
" class Coroutine(object):\n" CSTRING("""\
" __metaclass__ = _module.ABCMeta\n" class Coroutine(object):
__metaclass__ = ABCMeta
""")
#endif #endif
CSTRING("""\ CSTRING("""\
__slots__ = () __slots__ = ()
...@@ -1259,10 +1263,14 @@ def mk_coroutine(): ...@@ -1259,10 +1263,14 @@ def mk_coroutine():
""") """)
#if PY_MAJOR_VERSION >= 3 #if PY_MAJOR_VERSION >= 3
" class Awaitable(metaclass=_module.ABCMeta):\n" CSTRING("""\
class Awaitable(metaclass=ABCMeta):
""")
#else #else
" class Awaitable(object):\n" CSTRING("""\
" __metaclass__ = _module.ABCMeta\n" class Awaitable(object):
__metaclass__ = ABCMeta
""")
#endif #endif
CSTRING("""\ CSTRING("""\
__slots__ = () __slots__ = ()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment