From 5ea200eb7867976b3cdc60e2a378eb83938a3fc9 2018-08-14 18:30:22 From: Matthias Bussonnier Date: 2018-08-14 18:30:22 Subject: [PATCH] fix runnign on 3.7 --- diff --git a/IPython/core/async_helpers.py b/IPython/core/async_helpers.py index f22d93e..02bc2b5 100644 --- a/IPython/core/async_helpers.py +++ b/IPython/core/async_helpers.py @@ -77,7 +77,9 @@ def _should_be_async(cell: str) -> bool: """ try: - ast.parse(cell) + # we can't limit ourself to ast.parse, as it __accepts__ to parse on + # 3.7+, but just does not _compile_ + compile(cell, '<>', 'exec') return False except SyntaxError: try: