0
0
mirror of https://github.com/python/cpython.git synced 2024-11-27 15:27:06 +01:00
cpython/Tools/peg_generator
Petr Viktorin 6a2f12a754
[3.10] gh-125529: Avoid f-strings in the metagrammar (#125582)
Grammar actions need to be valid Python tokens and the accepted tokens need to be
listed in the actions mini-grammar).

In Python 3.12+ (PEP 701), f-strings are no longer STRING tokens, so pegen fails
to regenerate the metaparser on this Python version, as in:

   PYTHON_FOR_REGEN=python3.12 make regen-pegen-metaparser

Use `+` and plain strings rather than f-strings.

Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
2024-10-22 12:41:51 +01:00
..
data
peg_extension Sanitize macros and debug functions in pegen.c (GH-25291) 2021-04-09 01:17:31 +01:00
pegen [3.10] gh-125529: Avoid f-strings in the metagrammar (#125582) 2024-10-22 12:41:51 +01:00
scripts [3.10] Update grammar_grapher with the new forced (&&) directive (GH-31704) (GH-31719) 2022-03-07 14:54:08 +00:00
.clang-format
.gitignore
Makefile
mypy.ini
pyproject.toml
requirements.pip