Skip to content

Commit 7633f9c

Browse files
authored
Merge branch 'main' into remove-doc
2 parents 8996a96 + 6865b2b commit 7633f9c

File tree

6 files changed

+10
-60
lines changed

6 files changed

+10
-60
lines changed

ChangeLog

+7-3
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ Release date: TBA
110110

111111
Refs #1490
112112

113+
* Remove deprecated ``doc`` attribute for ``Module``, ``ClassDef``, and ``FunctionDef``.
114+
Use the ``doc_node`` attribute instead.
115+
116+
Refs #2154
117+
113118
* Remove unused and / or deprecated constants:
114119
- ``astroid.bases.BOOL_SPECIAL_METHOD``
115120
- ``astroid.bases.BUILTINS``
@@ -121,10 +126,9 @@ Release date: TBA
121126

122127
Refs #2141
123128

124-
* Remove deprecated ``doc`` attribute for ``Module``, ``ClassDef``, and ``FunctionDef``.
125-
Use the ``doc_node`` attribute instead.
129+
* Remove deprecated ``Ellipsis``, ``ExtSlice``, ``Index`` nodes.
126130

127-
Refs #2154
131+
Refs #2152
128132

129133

130134
What's New in astroid 2.15.5?

astroid/__init__.py

+1-4
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

+1-4
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

+1-10
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

-30
Original file line numberDiff line numberDiff line change
@@ -2035,16 +2035,6 @@ def _get_yield_nodes_skip_lambdas(self):
20352035
yield from self.value._get_yield_nodes_skip_lambdas()
20362036

20372037

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

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

21512141

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

26462626

2647-
class Index(NodeNG):
2648-
"""Class representing an :class:`ast.Index` node.
2649-
2650-
An :class:`Index` is a simple subscript.
2651-
2652-
Deprecated since v2.6.0 - Now part of the :class:`Subscript` node.
2653-
Will be removed with the release of v2.7.0
2654-
"""
2655-
2656-
26572627
class Keyword(NodeNG):
26582628
"""Class representing an :class:`ast.keyword` node.
26592629

doc/api/astroid.nodes.rst

-9
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)