Commit dc9a9649 authored by Stefan Behnel's avatar Stefan Behnel

Make IPythonMagic switch to language_level=2 on Py2, now that we default to "3str".

parent 21ae965c
......@@ -419,12 +419,11 @@ class CythonMagics(Magics):
quiet=quiet,
annotate=args.annotate,
force=True,
language_level=min(3, sys.version_info[0]),
)
if args.language_level is not None:
assert args.language_level in (2, 3)
opts['language_level'] = args.language_level
elif sys.version_info[0] >= 3:
opts['language_level'] = 3
return cythonize([extension], **opts)
except CompileError:
return None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment