Skip to content

Commit 5da906f

Browse files
authored
Merge branch 'main' into remove-sys-typing-guard
2 parents 010edcc + 6865b2b commit 5da906f

File tree

6 files changed

+7
-57
lines changed

6 files changed

+7
-57
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,10 @@ Release date: TBA
125125

126126
Refs #2153
127127

128+
* Remove deprecated ``Ellipsis``, ``ExtSlice``, ``Index`` nodes.
129+
130+
Refs #2152
131+
128132

129133
What's New in astroid 2.15.5?
130134
=============================

astroid/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
# and we need astroid/scoped_nodes and astroid/node_classes to work. So
8787
# importing with a wildcard would clash with astroid/nodes/scoped_nodes
8888
# and astroid/nodes/node_classes.
89-
from astroid.nodes import ( # pylint: disable=redefined-builtin (Ellipsis)
89+
from astroid.nodes import (
9090
CONST_CLS,
9191
AnnAssign,
9292
Arguments,
@@ -117,12 +117,10 @@
117117
Dict,
118118
DictComp,
119119
DictUnpack,
120-
Ellipsis,
121120
EmptyNode,
122121
EvaluatedObject,
123122
ExceptHandler,
124123
Expr,
125-
ExtSlice,
126124
For,
127125
FormattedValue,
128126
FunctionDef,
@@ -132,7 +130,6 @@
132130
IfExp,
133131
Import,
134132
ImportFrom,
135-
Index,
136133
JoinedStr,
137134
Keyword,
138135
Lambda,

astroid/node_classes.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import warnings
88

9-
from astroid.nodes.node_classes import ( # pylint: disable=redefined-builtin (Ellipsis)
9+
from astroid.nodes.node_classes import (
1010
CONST_CLS,
1111
AnnAssign,
1212
Arguments,
@@ -34,20 +34,17 @@
3434
DelName,
3535
Dict,
3636
DictUnpack,
37-
Ellipsis,
3837
EmptyNode,
3938
EvaluatedObject,
4039
ExceptHandler,
4140
Expr,
42-
ExtSlice,
4341
For,
4442
FormattedValue,
4543
Global,
4644
If,
4745
IfExp,
4846
Import,
4947
ImportFrom,
50-
Index,
5148
JoinedStr,
5249
Keyword,
5350
List,

astroid/nodes/__init__.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# This is the only node we re-export from the private _base_nodes module. This
1616
# is because it was originally part of the public API and hasn't been deprecated.
1717
from astroid.nodes._base_nodes import Statement
18-
from astroid.nodes.node_classes import ( # pylint: disable=redefined-builtin (Ellipsis)
18+
from astroid.nodes.node_classes import (
1919
CONST_CLS,
2020
AnnAssign,
2121
Arguments,
@@ -43,20 +43,17 @@
4343
DelName,
4444
Dict,
4545
DictUnpack,
46-
Ellipsis,
4746
EmptyNode,
4847
EvaluatedObject,
4948
ExceptHandler,
5049
Expr,
51-
ExtSlice,
5250
For,
5351
FormattedValue,
5452
Global,
5553
If,
5654
IfExp,
5755
Import,
5856
ImportFrom,
59-
Index,
6057
JoinedStr,
6158
Keyword,
6259
List,
@@ -149,12 +146,10 @@
149146
Dict,
150147
DictComp,
151148
DictUnpack,
152-
Ellipsis,
153149
EmptyNode,
154150
EvaluatedObject,
155151
ExceptHandler,
156152
Expr,
157-
ExtSlice,
158153
For,
159154
FormattedValue,
160155
FunctionDef,
@@ -164,7 +159,6 @@
164159
IfExp,
165160
Import,
166161
ImportFrom,
167-
Index,
168162
JoinedStr,
169163
Keyword,
170164
Lambda,
@@ -241,12 +235,10 @@
241235
"Dict",
242236
"DictComp",
243237
"DictUnpack",
244-
"Ellipsis",
245238
"EmptyNode",
246239
"EvaluatedObject",
247240
"ExceptHandler",
248241
"Expr",
249-
"ExtSlice",
250242
"For",
251243
"FormattedValue",
252244
"FunctionDef",
@@ -258,7 +250,6 @@
258250
"IfExp",
259251
"Import",
260252
"ImportFrom",
261-
"Index",
262253
"JoinedStr",
263254
"Keyword",
264255
"Lambda",

astroid/nodes/node_classes.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,16 +2034,6 @@ def _get_yield_nodes_skip_lambdas(self):
20342034
yield from self.value._get_yield_nodes_skip_lambdas()
20352035

20362036

2037-
class Ellipsis(_base_nodes.NoChildrenNode): # pylint: disable=redefined-builtin
2038-
"""Class representing an :class:`ast.Ellipsis` node.
2039-
2040-
An :class:`Ellipsis` is the ``...`` syntax.
2041-
2042-
Deprecated since v2.6.0 - Use :class:`Const` instead.
2043-
Will be removed with the release v2.7.0
2044-
"""
2045-
2046-
20472037
class EmptyNode(_base_nodes.NoChildrenNode):
20482038
"""Holds an arbitrary object in the :attr:`LocalsDictNodeNG.locals`."""
20492039

@@ -2148,16 +2138,6 @@ def catch(self, exceptions: list[str] | None) -> bool:
21482138
return any(node.name in exceptions for node in self.type._get_name_nodes())
21492139

21502140

2151-
class ExtSlice(NodeNG):
2152-
"""Class representing an :class:`ast.ExtSlice` node.
2153-
2154-
An :class:`ExtSlice` is a complex slice expression.
2155-
2156-
Deprecated since v2.6.0 - Now part of the :class:`Subscript` node.
2157-
Will be removed with the release of v2.7.0
2158-
"""
2159-
2160-
21612141
class For(
21622142
_base_nodes.MultiLineWithElseBlockNode,
21632143
_base_nodes.AssignTypeNode,
@@ -2590,16 +2570,6 @@ def __init__(
25902570
)
25912571

25922572

2593-
class Index(NodeNG):
2594-
"""Class representing an :class:`ast.Index` node.
2595-
2596-
An :class:`Index` is a simple subscript.
2597-
2598-
Deprecated since v2.6.0 - Now part of the :class:`Subscript` node.
2599-
Will be removed with the release of v2.7.0
2600-
"""
2601-
2602-
26032573
class Keyword(NodeNG):
26042574
"""Class representing an :class:`ast.keyword` node.
26052575

doc/api/astroid.nodes.rst

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,9 @@ Nodes
3737
astroid.nodes.Dict
3838
astroid.nodes.DictComp
3939
astroid.nodes.DictUnpack
40-
astroid.nodes.Ellipsis
4140
astroid.nodes.EmptyNode
4241
astroid.nodes.ExceptHandler
4342
astroid.nodes.Expr
44-
astroid.nodes.ExtSlice
4543
astroid.nodes.For
4644
astroid.nodes.FormattedValue
4745
astroid.nodes.FunctionDef
@@ -51,7 +49,6 @@ Nodes
5149
astroid.nodes.IfExp
5250
astroid.nodes.Import
5351
astroid.nodes.ImportFrom
54-
astroid.nodes.Index
5552
astroid.nodes.JoinedStr
5653
astroid.nodes.Keyword
5754
astroid.nodes.Lambda
@@ -145,16 +142,12 @@ Nodes
145142

146143
.. autoclass:: astroid.nodes.DictUnpack
147144

148-
.. autoclass:: astroid.nodes.Ellipsis
149-
150145
.. autoclass:: astroid.nodes.EmptyNode
151146

152147
.. autoclass:: astroid.nodes.ExceptHandler
153148

154149
.. autoclass:: astroid.nodes.Expr
155150

156-
.. autoclass:: astroid.nodes.ExtSlice
157-
158151
.. autoclass:: astroid.nodes.For
159152

160153
.. autoclass:: astroid.nodes.FormattedValue
@@ -173,8 +166,6 @@ Nodes
173166

174167
.. autoclass:: astroid.nodes.ImportFrom
175168

176-
.. autoclass:: astroid.nodes.Index
177-
178169
.. autoclass:: astroid.nodes.JoinedStr
179170

180171
.. autoclass:: astroid.nodes.Keyword

0 commit comments

Comments
 (0)