Astropy: Cython FutureWarning language_level not set

Created on 9 Nov 2018  ·  3Comments  ·  Source: astropy/astropy

When I installed Astropy 3.2.dev23273 on Windows 10, Python 3.7.1 [MSC v.19124)], and Cython 0.29, I see the following warning. This is just one of them. This seems to affect multiple sub-packages.

C:\...\Cython\Compiler\Main.py:367:FutureWarning:
    Cython directive 'language_level' not set, using 2 for now (Py2).
    This will change in a later release!
    File: C:\...\astropy\astropy\table\_np_utils.pyx

Perhaps this is related to cython/cython#2565. Do we need to do anything on our side?

installation question

Most helpful comment

This is a new warning from Cython 0.29: https://cython.readthedocs.io/en/latest/src/changes.html#id7
I guess we could safely use language_level=3 (https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#compiler-options).

All 3 comments

This is a new warning from Cython 0.29: https://cython.readthedocs.io/en/latest/src/changes.html#id7
I guess we could safely use language_level=3 (https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#compiler-options).

PR to include this in 3.1?

I'm on it. See #8106 for my attempt.

Was this page helpful?
0 / 5 - 0 ratings