FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

bpo-45848: Delimitate when source lines can't be located in the parser error handling functions by pablogsal · Pull Request #29626 · python/cpython · GitHub

/ cpython Public

bpo-45848: Delimitate when source lines can't be located in the parser error handling functions - #29626

Closed
pablogsal wants to merge 2 commits into
python:mainfrom
pablogsal:error_offset
Closed

pablogsal wants to merge 2 commits into
python:mainfrom
pablogsal:error_offset

Conversation

pablogsal commented Nov 18, 2021 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

ambv removed the skip issue label Nov 19, 2021
ambv changed the title Delimitate when source lines can't be located in the parser error handling functions bpo-45848: Delimitate when source lines can't be located in the parser error handling functions Nov 19, 2021

ambv commented Nov 19, 2021

Copy link
Copy Markdown
Contributor

Running the test I added with the fix:

test_encoding_cookie (test.test_peg_generator.test_c_parser.TestCPythonParserEdgeCases) ... ok

----------------------------------------------------------------------
Ran 1 test in 0.125s

OK

== Tests result: SUCCESS ==

Running the test without the fix:

test test_peg_generator failed -- Traceback (most recent call last):
  File "/private/tmp/cpymain/Lib/test/test_peg_generator/test_c_parser.py", line 512, in test_encoding_cookie
    self.assert_python(
    ^^^^^^^^^^^^^^^^^^^
  File "/private/tmp/cpymain/Lib/test/test_peg_generator/test_c_parser.py", line 507, in assert_python
    self.assertNotIn(not_expected, output)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 'Fatal Python error: Aborted' unexpectedly found in '\nAssertion failed: (p->tok->fp == NULL || p->tok->fp == stdin), function get_error_line, file Parser/pegen.c, line 408.\nFatal Python error: Aborted\n\nCurrent thread 0x000000010f006dc0 (most recent call first):\n  <no Python frame>\n'

test_peg_generator failed (1 failure)

== Tests result: FAILURE ==

pablogsal commented Nov 19, 2021 •
edited
Loading

Copy link
Copy Markdown
Member Author

@ambv I am closing this in favour of a more complete and robust version: #29646

pablogsal closed this Nov 19, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL