Describe the bug
according to the compiled result, Cython doesn't support alignment expression(PEP572), here is the details:
Error compiling Cython file: ------------------------------------------------------------ ... :param match_offs: :param copy_cols: :return: """ for line in range(prev_cells[0].row+1, prev_cells[1].row): if not (subj_name := ws_prev.cell(line, fin_cells[0].col_idx+match_offs).value): # bugs here ^ ------------------------------------------------------------ financial.py:107:26: Expected ')', found ':' Traceback (most recent call last): File "setup.py", line 22, in <module> ext_modules=cythonize([Extension("financial", ["financial.py"], define_macros=[("MS_WIN64", 1)])], File "D:\toolchain\Python38\lib\site-packages\Cython\Build\Dependencies.py", line 1102, in cythonize cythonize_one(*args) File "D:\toolchain\Python38\lib\site-packages\Cython\Build\Dependencies.py", line 1225, in cythonize_one raise CompileError(None, pyx_file) Cython.Compiler.Errors.CompileError: financial.py
To Reproduce
Code to reproduce the behaviour:
# setup.py: from distutils.core import setup, Extension from Cython.Build import cythonize from Cython.Distutils import build_ext setup(name="autooffice", requires=["openpyxl", "cython"], cmdclass={'build_ext': build_ext}, ext_modules=cythonize( [Extension("financial", ["financial.py"], define_macros=[("MS_WIN64", 1)])], compiler_directives={'language_level': 3}) ) # exec the cmd in shell: # $ python setup.py build --compiler=mingw32
Environment (please complete the following information):
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Closed #4066.
Duplicate #2636