From J.Demeyer at UGent.be Fri Jun 1 13:56:47 2018 From: J.Demeyer at UGent.be (Jeroen Demeyer) Date: Fri, 1 Jun 2018 19:56:47 +0200 Subject: [Cython] Should we start requiring "language_level=2" for .pyx files? In-Reply-To: <47b0cae337ba4e489d9a40d9accd1795@xmail101.UGent.be> References: <9fd1515c-ef28-8f1f-ebfe-0be60f187ca0@behnel.de> <47b0cae337ba4e489d9a40d9accd1795@xmail101.UGent.be> Message-ID: <5B1188DF.7040200@UGent.be> 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 > anything. 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.