[3.10] bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529) (GH-30542)

* bpo-46339: Fix crash in the parser when computing error text for multi-line f-strings (GH-30529)

Automerge-Triggered-By: GH:pablogsal
(cherry picked from commit cedec19be8)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

* Fix interactive mode

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-01-20 05:05:10 -08:00 committed by GitHub
parent a6a0885480
commit 1fb1f5d8bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 427 deletions

View file

@ -278,6 +278,12 @@ class ExceptionTests(unittest.TestCase):
}
\"\"\"
}'''""", 5, 17)
check('''f"""
{
6
0="""''', 5, 13)
# Errors thrown by symtable.c
check('x = [(yield i) for i in range(3)]', 1, 7)