From 921c8373a1202839ea7211f892c7e3a28035022c 2020-02-01 22:02:36 From: Matthias Bussonnier Date: 2020-02-01 22:02:36 Subject: [PATCH] Attempt to fix test failure with generate_tokens It looks like the try/except comments were wrong and generate_tokens is available on Py3 --- diff --git a/IPython/core/ultratb.py b/IPython/core/ultratb.py index 0caf7ec..9e7e8fb 100644 --- a/IPython/core/ultratb.py +++ b/IPython/core/ultratb.py @@ -101,7 +101,7 @@ import time import tokenize import traceback -generate_tokens = tokenize.tokenize +from tokenize import generate_tokens # For purposes of monkeypatching inspect to fix a bug in it. from inspect import getsourcefile, getfile, getmodule, \