[Cython] Should we start requiring "language_level=2" for .pyx files?
J.Demeyer at UGent.be
Fri Jun 1 13:56:47 EDT 2018
On 2018-05-31 16:35, Erik Bray wrote:
> Perhaps you could clarify something: I tried suggesting a while ago
> that Sage start using language_level=3 at least when actually building
> Sage on Python 3. I know this isn't necessary but it just seemed to
> make logical sense. But Jeroen was convinced it wasn't necessary
> because, according to him, language_level=3 doesn't really do
For the record, the thing that I objected most to was changing it *only*
on Python 3. For best portability, you should use either
language_level=2 or language_level=3 (as opposed to making the
language_level depend on the Python version that you are targetting).
language_level=3 enables all __future__ imports for Python 3 (like
unicode_literals) and it changes the parser to be like Python 3 (this
impacts exec for example). So it does affect stuff, but not so much
beyond what you can get with __future__ imports.
More information about the cython-devel