Show More
@@ -49,6 +49,14 b' from warnings import warn' | |||
|
49 | 49 | from logging import error |
|
50 | 50 | from io import StringIO |
|
51 | 51 | |
|
52 | if sys.version_info > (3,8): | |
|
53 | from ast import Module | |
|
54 | else : | |
|
55 | # mock the new API, ignore second argument | |
|
56 | # see https://github.com/ipython/ipython/issues/11590 | |
|
57 | from ast import Module as OriginalModule | |
|
58 | Module = lambda nodelist, type_ignores: OriginalModule(nodelist) | |
|
59 | ||
|
52 | 60 | |
|
53 | 61 | #----------------------------------------------------------------------------- |
|
54 | 62 | # Magic implementation classes |
@@ -1276,7 +1284,7 b' python-profiler package from non-free.""")' | |||
|
1276 | 1284 | , '<timed eval>' |
|
1277 | 1285 | , 'eval') |
|
1278 | 1286 | expr_ast=expr_ast.body[:-1] |
|
1279 |
expr_ast = |
|
|
1287 | expr_ast = Module(expr_ast, []) | |
|
1280 | 1288 | |
|
1281 | 1289 | t0 = clock() |
|
1282 | 1290 | code = self.shell.compile(expr_ast, source, mode) |
General Comments 0
You need to be logged in to leave comments.
Login now