From 902885656df848aebc22c130540e2c54a766db4d Mon Sep 17 00:00:00 2001 From: Dave Halter Date: Sat, 25 Jul 2020 02:10:10 +0200 Subject: [PATCH] Remove some Python 3.6 references --- README.rst | 2 +- docs/conf.py | 2 +- parso/__init__.py | 2 +- parso/pgen2/grammar_parser.py | 2 +- test/failing_examples.py | 2 +- test/test_error_recovery.py | 2 +- test/test_tokenize.py | 1 - 7 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.rst b/README.rst index d87f2ef..6a048e6 100644 --- a/README.rst +++ b/README.rst @@ -31,7 +31,7 @@ A simple example: .. code-block:: python >>> import parso - >>> module = parso.parse('hello + 1', version="3.6") + >>> module = parso.parse('hello + 1', version="3.9") >>> expr = module.children[0] >>> expr PythonNode(arith_expr, [, , ]) diff --git a/docs/conf.py b/docs/conf.py index 0e6ac90..368ffb0 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -273,7 +273,7 @@ autodoc_default_flags = [] # -- Options for intersphinx module -------------------------------------------- intersphinx_mapping = { - 'http://docs.python.org/': ('https://docs.python.org/3.6', None), + 'http://docs.python.org/': ('https://docs.python.org/3.8', None), } diff --git a/parso/__init__.py b/parso/__init__.py index f331984..eecb86d 100644 --- a/parso/__init__.py +++ b/parso/__init__.py @@ -13,7 +13,7 @@ Parso consists of a small API to parse Python and analyse the syntax tree. A simple example: >>> import parso ->>> module = parso.parse('hello + 1', version="3.6") +>>> module = parso.parse('hello + 1', version="3.9") >>> expr = module.children[0] >>> expr PythonNode(arith_expr, [, , ]) diff --git a/parso/pgen2/grammar_parser.py b/parso/pgen2/grammar_parser.py index 0be7209..c1bd90a 100644 --- a/parso/pgen2/grammar_parser.py +++ b/parso/pgen2/grammar_parser.py @@ -18,7 +18,7 @@ class GrammarParser(): self._bnf_grammar = bnf_grammar self.generator = tokenize( bnf_grammar, - version_info=parse_version_string('3.6') + version_info=parse_version_string('3.9') ) self._gettoken() # Initialize lookahead diff --git a/test/failing_examples.py b/test/failing_examples.py index 46d75f1..e58b0a0 100644 --- a/test/failing_examples.py +++ b/test/failing_examples.py @@ -34,7 +34,7 @@ FAILING_EXAMPLES = [ 'lambda x=3, y: x', '__debug__ = 1', 'with x() as __debug__: pass', - # Mostly 3.6 relevant + '[]: int', '[a, b]: int', '(): int', diff --git a/test/test_error_recovery.py b/test/test_error_recovery.py index d0d3f7b..87efd47 100644 --- a/test/test_error_recovery.py +++ b/test/test_error_recovery.py @@ -74,7 +74,7 @@ def test_invalid_token(): def test_invalid_token_in_fstr(): - module = load_grammar(version='3.6').parse('f"{a + ? + b}"') + module = load_grammar(version='3.9').parse('f"{a + ? + b}"') error_node, q, plus_b, error1, error2, endmarker = module.children assert error_node.get_code() == 'f"{a +' assert q.value == '?' diff --git a/test/test_tokenize.py b/test/test_tokenize.py index 1ae9066..499e5d8 100644 --- a/test/test_tokenize.py +++ b/test/test_tokenize.py @@ -184,7 +184,6 @@ def test_ur_literals(): check('bR""') check('Rb""') - # Starting with Python 3.6 format strings where introduced. check('fr""') check('rF""') check('f""')