mirror of
https://github.com/python/cpython.git
synced 2025-09-09 18:32:22 +00:00
bpo-40939: Remove the old parser (GH-20768)
This commit removes the old parser, the deprecated parser module, the old parser compatibility flags and environment variables and all associated support code and documentation.
This commit is contained in:
parent
311110abcd
commit
1ed83adb0e
53 changed files with 24447 additions and 35978 deletions
|
@ -33,7 +33,6 @@ import shutil
|
|||
import tempfile
|
||||
import unittest
|
||||
import warnings
|
||||
from test.support import use_old_parser
|
||||
|
||||
|
||||
TEMPLATE = r"""# coding: %s
|
||||
|
@ -168,8 +167,7 @@ class TestLiterals(unittest.TestCase):
|
|||
eval("b'''\n\\z'''")
|
||||
self.assertEqual(len(w), 1)
|
||||
self.assertEqual(w[0].filename, '<string>')
|
||||
if use_old_parser():
|
||||
self.assertEqual(w[0].lineno, 1)
|
||||
self.assertEqual(w[0].lineno, 1)
|
||||
|
||||
with warnings.catch_warnings(record=True) as w:
|
||||
warnings.simplefilter('error', category=DeprecationWarning)
|
||||
|
@ -178,8 +176,7 @@ class TestLiterals(unittest.TestCase):
|
|||
exc = cm.exception
|
||||
self.assertEqual(w, [])
|
||||
self.assertEqual(exc.filename, '<string>')
|
||||
if use_old_parser():
|
||||
self.assertEqual(exc.lineno, 1)
|
||||
self.assertEqual(exc.lineno, 1)
|
||||
|
||||
def test_eval_bytes_raw(self):
|
||||
self.assertEqual(eval(""" br'x' """), b'x')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue