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:
Pablo Galindo 2020-06-11 17:30:46 +01:00 committed by GitHub
parent 311110abcd
commit 1ed83adb0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
53 changed files with 24447 additions and 35978 deletions

View file

@ -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')