8000 Remove another thing from the tests and clarify whatsnew · python/cpython@40b5965 · GitHub
[go: up one dir, main page]

Skip to content

Commit 40b5965

Browse files
committed
Remove another thing from the tests and clarify whatsnew
1 parent 1d4634d commit 40b5965

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Doc/whatsnew/3.14.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,11 @@ ast
121121
* :class:`!ast.Ellipsis`
122122

123123
Use :class:`ast.Constant` instead. As a consequence of these removals,
124-
``visit_Num``, ``visit_Str``, ``visit_Bytes``, ``visit_NameConstant`` and
125-
``visit_Ellipsis`` methods will no longer have any effect on
126-
:class:`ast.NodeVisitor` subclasses; use ``visit_Constant`` instead.
124+
user-defined ``visit_Num``, ``visit_Str``, ``visit_Bytes``,
125+
``visit_NameConstant`` and ``visit_Ellipsis`` methods on custom
126+
:class:`ast.NodeVisitor` subclasses will no longer be called when the
127+
``NodeVisitor`` subclass is visiting an AST. Define ``visit_Constant``
128+
methods instead.
127129

128130
Also, remove the following deprecated properties on :class:`ast.Constant`,
129131
which were present for compatibility with the now-removed AST classes:

Lib/test/test_ast.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2608,8 +2608,6 @@ def test_source_segment_missing_info(self):
26082608

26092609

26102610
class NodeTransformerTests(ASTTestMixin, unittest.TestCase):
2611-
visitor_class = ast.NodeTransformer
2612-
26132611
def assertASTTransformation(self, tranformer_class,
26142612
initial_code, expected_code):
26152613
initial_ast = ast.parse(dedent(initial_code))

0 commit comments

Comments
 (0)
0