[Cython] Should we start requiring "language_level=2" for .pyx files?

Nathan Goldbaum nathan12343 at gmail.com
Mon May 28 15:24:06 EDT 2018


It would help if cython could generate compiler warnings for a release or
two about py2-specific constructs before officially switching the default
language level.

On Mon, May 28, 2018 at 2:14 PM Stefan Behnel <stefan_ml at behnel.de> wrote:

> Hi,
>
> Python 3 is clearly taking over the world these days, so it starts feeling
> arcane to require Py2 syntax in .pyx files. Increasingly, it means that
> people cannot just rename .py files anymore to start optimising them,
> because the .py file has a high chance of being written in Py3 syntax.
>
> Eventually, we will have to switch to Py3 syntax by default in order to
> follow what most people are (or will be) used to.
>
> As a transition, I think we could start warning about cases where the
> language level is not set explicitly. If people start marking their code as
> being "Cython 2.x code", either with an in-file directive or from their
> setup.py, we will have less of a problem in the future to change the
> default.
>
> What do you think? Any other ideas, comments, objections?
>
> Stefan
> _______________________________________________
> cython-devel mailing list
> cython-devel at python.org
> https://mail.python.org/mailman/listinfo/cython-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20180528/f4c9aaab/attachment.html>


More information about the cython-devel mailing list