Skip to content

Commit 03b8f12

Browse files
committed
Make the coroutine hack independent of interpreter type
1 parent f69bda4 commit 03b8f12

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

graalpython/lib-graalpython/type.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@
4141

4242
# TODO -----------------------------------------------------------------------------------------------------------------
4343
# TODO: REMOVEME, temporary patch for coroutines
44-
async def _c(): pass
45-
_c = _c()
46-
ctype = type(_c)
47-
if not hasattr(ctype, "close"):
48-
def _coro_close():
49-
pass
50-
ctype.close = _coro_close
44+
# AST interpreter returns None from coroutines
45+
ctype = type(None)
46+
def _coro_close():
47+
pass
48+
ctype.close = _coro_close
5149
# TODO -----------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)