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
Describe the bug
The special f-string = causes the file to not compile
To Reproduce
Code to reproduce the behaviour:
foo ="bar"print(f"{foo=}")
Error
Compiling /home/davfsa/coding/test-bots/test.py because it changed.
[1/1] Cythonizing /home/davfsa/coding/test-bots/test.py
/home/davfsa/coding/hikari/.venv/lib/python3.8/site-packages/Cython/Compiler/Main.py:344: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /home/davfsa/coding/test-bots/test.py
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
foo = "bar"
print(f"{foo=}") ^
------------------------------------------------------------
test.py:2:15: Expected ')', found '='
Traceback (most recent call last):
File "/home/davfsa/coding/hikari/.venv/bin/cythonize", line 8, in <module>
sys.exit(main())
File "/home/davfsa/coding/hikari/.venv/lib/python3.8/site-packages/Cython/Build/Cythonize.py", line 224, in main
cython_compile(path, options)
File "/home/davfsa/coding/hikari/.venv/lib/python3.8/site-packages/Cython/Build/Cythonize.py", line 68, in cython_compile
ext_modules = cythonize(
File "/home/davfsa/coding/hikari/.venv/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1110, in cythonize
cythonize_one(*args)
File "/home/davfsa/coding/hikari/.venv/lib/python3.8/site-packages/Cython/Build/Dependencies.py", line 1277, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: /home/davfsa/coding/test-bots/test.py
Expected behavior
Should compile without warning.
Environment
OS: Linux
Python version 3.8.5
Cython version 3.0a6
The text was updated successfully, but these errors were encountered:
davfsa
changed the title
[BUG] F-string with special format fails to compile
[BUG] F-string with = special format fails to compile
Nov 28, 2020
Describe the bug
The special f-string
=
causes the file to not compileTo Reproduce
Code to reproduce the behaviour:
Error
Expected behavior
Should compile without warning.
Environment
The text was updated successfully, but these errors were encountered: