Skip to content

bpo-45759: Re: Better error messages for non-matching 'elif'/'else' statements #29775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

thatbirdguythatuknownot
Copy link
Contributor

@thatbirdguythatuknownot thatbirdguythatuknownot commented Nov 25, 2021

Repeated pull request with a different branch of the fork. Original pull request link -> #29513

https://bugs.python.org/issue45759

@thatbirdguythatuknownot
Copy link
Contributor Author

This pull request was made as a workaround to the conflict in Parser/parser.c without git.

@github-actions
Copy link

github-actions bot commented Jan 4, 2022

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale Stale PR or inactive for long period of time. label Jan 4, 2022
@MaxwellDupre
Copy link
Contributor

You have make 67284 changes to parser.c, can you say why its like this rather than usual additions, deletions?

@AlexWaygood
Copy link
Member

You have make 67284 changes to parser.c, can you say why its like this rather than usual additions, deletions?

parser.c is an autogenerated file. The number of lines changed in parser.c is not relevant to anything.

@thatbirdguythatuknownot
Copy link
Contributor Author

You have make 67284 changes to parser.c, can you say why its like this rather than usual additions, deletions?

@MaxwellDupre It's an autogenerated file, you can also see this in other minor grammar changes.

@MaxwellDupre
Copy link
Contributor

Ah, right of course, VS code showed me a confusing view of differences, but Git showed the correct one.

I have tried to compile and got:
Traceback (most recent call last):
File "/home/me/Documents/GitHub/cpython/./Tools/scripts/deepfreeze.py", line 1, in
import argparse
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/argparse.py", line 89, in
import re as _re
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/re/init.py", line 125, in
from . import _compiler, _parser
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/re/_compiler.py", line 18, in
assert _sre.MAGIC == MAGIC, "SRE module mismatch"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: SRE module mismatch
...
make: *** [Makefile:1106: Python/deepfreeze/site.c] Error 1
make: *** [Makefile:1079: Python/deepfreeze/abc.c] Error 1
make: *** [Makefile:1100: Python/deepfreeze/posixpath.c] Error 1
make: *** [Makefile:1085: Python/deepfreeze/io.c] Error 1
make: *** [Makefile:1097: Python/deepfreeze/ntpath.c] Error 1
make: *** [Makefile:1112: Python/deepfreeze/hello.c] Error 1
make: *** [Makefile:1115: Python/deepfreeze/phello.c] Error 1
...
AssertionError: SRE module mismatch
make: *** [Makefile:1121: Python/deepfreeze/phello.ham.eggs.c] Error 1
make: *** [Makefile:1118: Python/deepfreeze/phello.ham.c] Error 1
make: *** [Makefile:1124: Python/deepfreeze/phello.spam.c] Error 1
Traceback (most recent call last):
File "/home/me/Documents/GitHub/cpython/./Tools/scripts/deepfreeze.py", line 1, in
import argparse
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/argparse.py", line 89, in
import re as _re
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/re/init.py", line 125, in
from . import _compiler, _parser
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/re/_compiler.py", line 18, in
assert _sre.MAGIC == MAGIC, "SRE module mismatch"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: SRE module mismatch
make: *** [Makefile:1127: Python/deepfreeze/frozen_only.c] Error 1


Then tried:
!  ~/D/G/cpython   patch-10 $  make regen-pegen
PYTHONPATH=./Tools/peg_generator python3.11 -m pegen -q c
./Grammar/python.gram
./Grammar/Tokens
-o ./Parser/parser.new.c
Traceback (most recent call last):
File "", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "/home/me/Documents/GitHub/cpython/Tools/peg_generator/pegen/main.py", line 8, in
import argparse
^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/argparse.py", line 89, in
import re as _re
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/re/init.py", line 125, in
from . import _compiler, _parser
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/re/_compiler.py", line 18, in
assert _sre.MAGIC == MAGIC, "SRE module mismatch"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: SRE module mismatch
make: *** [Makefile:1353: regen-pegen] Error 1


I note that none of the build bots have run.


I am using Fedora 5.18.5-200.fc36.x86_64 and
./configure --with-pydebug
make -s -j

@thatbirdguythatuknownot
Copy link
Contributor Author

thatbirdguythatuknownot commented Dec 19, 2023

Other PR (#29513) got merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting review stale Stale PR or inactive for long period of time.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants