You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the current version of cython it is possible to use valid python syntax to do what used to need a cimport statement.
So isort turns
import cython
from cython.cimports.libc import math
def use_libc_math():
return math.ceil(5.5)
into
import cython
from cython.cimports.libc cimport math
def use_libc_math():
return math.ceil(5.5)
The resulting file cannot be run by the python interpreter, breaks tests and breaks the cython compilation
(venv311) C:\Users\Juan\cruji-enaire>cython -a test.py
C:\Users\Juan\venv311\Lib\site-packages\Cython\Compiler\Main.py:345: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\Juan\cruji-enaire\test.py
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
import cython
from cython.cimports.libc cimport math
^
------------------------------------------------------------
test.py:3:26: Expected 'import' or 'cimport'
isort should be able to recognize the new from cython.cimports syntax and don't turn the import into a cimport.
The text was updated successfully, but these errors were encountered:
With the current version of cython it is possible to use valid python syntax to do what used to need a cimport statement.
So isort turns
into
The resulting file cannot be run by the python interpreter, breaks tests and breaks the cython compilation
isort should be able to recognize the new
from cython.cimports
syntax and don't turn the import into a cimport.The text was updated successfully, but these errors were encountered: