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
Hey there! I have some problem with command make regen-pegen after editing Grammar > python.gram file.
CPython was correctly compiled and lauched.
If i type this after editing grammar file: make regen-pegen
I got this:
PYTHONPATH=./Tools/peg_generator python3 -m pegen -q c \
./Grammar/python.gram \
./Grammar/Tokens \
-o ./Parser/pegen/parse.new.c
Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/webmilk/Desktop/cpython-3.9/Tools/peg_generator/pegen/__main__.py", line 16, in <module>
from pegen.build import Grammar, Parser, Tokenizer, ParserGenerator
File "/home/webmilk/Desktop/cpython-3.9/Tools/peg_generator/pegen/build.py", line 11, in <module>
from pegen.c_generator import CParserGenerator
File "/home/webmilk/Desktop/cpython-3.9/Tools/peg_generator/pegen/c_generator.py", line 2, in <module>
from dataclasses import field, dataclass
ModuleNotFoundError: No module named 'dataclasses'
Makefile:871: recipe for target 'regen-pegen' failed
make: *** [regen-pegen] Error 1
Ubuntu: 18.04 CPython: 3.9
CPython versions tested on:
3.9
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered:
For the issue at hand: @0xWEBMILK: Make sure that the python3 command on your shell's search path is recent enough. You are currently using Python 3.6 to run the parser generator and that won't work.
File "/home/webmilk/Desktop/cpython-3.9/Tools/peg_generator/pegen/c_generator.py", line 2, in
from dataclasses import field, dataclass
Since dataclasses were introduced in 3.7, this is the reason why the build fails. I will close this one as not an issue (feel free to say otherwise if the issue persists even when upgrading to Python 3.10 (which I think is the minimal version for the parser))
Bug report
Bug description:
Hey there! I have some problem with command
make regen-pegen
after editingGrammar > python.gram
file.CPython was correctly compiled and lauched.
If i type this after editing grammar file:
make regen-pegen
I got this:
Ubuntu: 18.04
CPython: 3.9
CPython versions tested on:
3.9
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: