Skip to content

Commit c8709fd

Browse files
committed
Remove Tick internals deprecated in 3.3.
1 parent 0520d99 commit c8709fd

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Implicit initialization of ``Tick`` attributes
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The `.Tick` constructor no longer initializes the attributes ``tick1line``,
5+
``tick2line``, ``gridline``, ``label1``, and ``label2`` via ``_get_tick1line``,
6+
``_get_tick2line``, ``_get_gridline``, ``_get_text1``, and ``_get_text2``.
7+
Please directly set the attribute in the subclass' ``__init__`` instead.
8+
9+
Unused parameters
10+
~~~~~~~~~~~~~~~~~
11+
The following parameters do not have any effect and have been removed:
12+
13+
- parameter *label* of `.Tick`

lib/matplotlib/axis.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ class Tick(martist.Artist):
5454
The right/top tick label.
5555
5656
"""
57-
@_api.delete_parameter("3.3", "label")
58-
def __init__(self, axes, loc, label=None,
57+
def __init__(self, axes, loc, *,
5958
size=None, # points
6059
width=None,
6160
color=None,
@@ -175,18 +174,6 @@ def __init__(self, axes, loc, label=None,
175174

176175
self._apply_tickdir(tickdir)
177176

178-
for meth, attr in [("_get_tick1line", "tick1line"),
179-
("_get_tick2line", "tick2line"),
180-
("_get_gridline", "gridline"),
181-
("_get_text1", "label1"),
182-
("_get_text2", "label2")]:
183-
overridden_method = _api.deprecate_method_override(
184-
getattr(__class__, meth), self, since="3.3", message="Relying "
185-
f"on {meth} to initialize Tick.{attr} is deprecated since "
186-
f"%(since)s and will not work %(removal)s; please directly "
187-
f"set the attribute in the subclass' __init__ instead.")
188-
if overridden_method:
189-
setattr(self, attr, overridden_method())
190177
for artist in [self.tick1line, self.tick2line, self.gridline,
191178
self.label1, self.label2]:
192179
self._set_artist_props(artist)

0 commit comments

Comments
 (0)