From 14214027dded3111d9f739ede57d2932ef3fb4a8 2022-04-07 13:31:36 From: Matthias Bussonnier Date: 2022-04-07 13:31:36 Subject: [PATCH] Merge pull request #13630 from Carreau/longerfail DEBUG: on pexpect failure show 1000 chars buffer --- diff --git a/IPython/core/inputtransformer2.py b/IPython/core/inputtransformer2.py index 5b6f4a1..9839607 100644 --- a/IPython/core/inputtransformer2.py +++ b/IPython/core/inputtransformer2.py @@ -733,8 +733,10 @@ class MaybeAsyncCompile(Compile): super().__init__() self.flags |= extra_flags - def __call__(self, *args, **kwds): - return compile(*args, **kwds) + + if sys.version_info < (3,8): + def __call__(self, *args, **kwds): + return compile(*args, **kwds) class MaybeAsyncCommandCompiler(CommandCompiler): diff --git a/IPython/core/tests/test_debugger.py b/IPython/core/tests/test_debugger.py index eb3b5f3..56c32f8 100644 --- a/IPython/core/tests/test_debugger.py +++ b/IPython/core/tests/test_debugger.py @@ -391,6 +391,7 @@ def _decorator_skip_setup(): child = pexpect.spawn( sys.executable, ["-m", "IPython", "--colors=nocolor"], env=env ) + child.str_last_chars = 1000 child.timeout = 5 * IPYTHON_TESTING_TIMEOUT_SCALE child.expect("IPython")