Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0908702

Browse filesBrowse files
committed
Use deprecate_privatize_attribute more.
1 parent d03f9e5 commit 0908702
Copy full SHA for 0908702

File tree

Expand file treeCollapse file tree

7 files changed

+13
-42
lines changed
Filter options
Expand file treeCollapse file tree

7 files changed

+13
-42
lines changed

‎lib/matplotlib/animation.py

Copy file name to clipboardExpand all lines: lib/matplotlib/animation.py
+2-9Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,8 @@ class MovieWriter(AbstractMovieWriter):
276276
# stored. Third-party writers cannot meaningfully set these as they cannot
277277
# extend rcParams with new keys.
278278

279-
@cbook.deprecated("3.3")
280-
@property
281-
def exec_key(self):
282-
return self._exec_key
283-
284-
@cbook.deprecated("3.3")
285-
@property
286-
def args_key(self):
287-
return self._args_key
279+
exec_key = cbook._deprecate_privatize_attribute("3.3")
280+
args_key = cbook._deprecate_privatize_attribute("3.3")
288281

289282
def __init__(self, fps=5, codec=None, bitrate=None, extra_args=None,
290283
metadata=None):

‎lib/matplotlib/backends/backend_pgf.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_pgf.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -420,10 +420,7 @@ def __init__(self, figure, fh, dummy=False):
420420
if m.startswith("draw_"):
421421
self.__dict__[m] = lambda *args, **kwargs: None
422422

423-
@cbook.deprecated("3.2")
424-
@property
425-
def latexManager(self):
426-
return self._latexManager
423+
latexManager = cbook._deprecate_privatize_attribute("3.2")
427424

428425
def draw_markers(self, gc, marker_path, marker_trans, path, trans,
429426
rgbFace=None):

‎lib/matplotlib/backends/backend_qt5.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt5.py
+2-4Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,8 @@ def __init__(self, canvas, parent, coordinates=True):
689689

690690
NavigationToolbar2.__init__(self, canvas)
691691

692-
@cbook.deprecated("3.3", alternative="self.canvas.parent()")
693-
@property
694-
def parent(self):
695-
return self._parent
692+
parent = cbook._deprecate_privatize_attribute(
693+
"3.3", alternative="self.canvas.parent()")
696694

697695
@cbook.deprecated(
698696
"3.3", alternative="os.path.join(mpl.get_data_path(), 'images')")

‎lib/matplotlib/cm.py

Copy file name to clipboardExpand all lines: lib/matplotlib/cm.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -471,10 +471,7 @@ def changed(self):
471471
self._update_dict[key] = True
472472
self.stale = True
473473

474-
@cbook.deprecated("3.3")
475-
@property
476-
def update_dict(self):
477-
return self._update_dict
474+
update_dict = cbook._deprecate_privatize_attribute("3.3")
478475

479476
@cbook.deprecated("3.3")
480477
def add_checker(self, checker):

‎lib/matplotlib/image.py

Copy file name to clipboardExpand all lines: lib/matplotlib/image.py
+2-8Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -990,10 +990,7 @@ def _check_unsampled_image(self):
990990
"""Return False. Do not use unsampled image."""
991991
return False
992992

993-
@cbook.deprecated("3.3")
994-
@property
995-
def is_grayscale(self):
996-
return self._is_grayscale
993+
is_grayscale = cbook._deprecate_privatize_attribute("3.3")
997994

998995
def make_image(self, renderer, magnification=1.0, unsampled=False):
999996
# docstring inherited
@@ -1144,10 +1141,7 @@ def __init__(self, ax,
11441141
if A is not None:
11451142
self.set_data(x, y, A)
11461143

1147-
@cbook.deprecated("3.3")
1148-
@property
1149-
def is_grayscale(self):
1150-
return self._is_grayscale
1144+
is_grayscale = cbook._deprecate_privatize_attribute("3.3")
11511145

11521146
def make_image(self, renderer, magnification=1.0, unsampled=False):
11531147
# docstring inherited

‎lib/matplotlib/patches.py

Copy file name to clipboardExpand all lines: lib/matplotlib/patches.py
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -650,10 +650,7 @@ def __init__(self, patch, ox, oy, props=None, **kwargs):
650650
self._shadow_transform = transforms.Affine2D()
651651
self._update()
652652

653-
@cbook.deprecated("3.3")
654-
@property
655-
def props(self):
656-
return self._props
653+
props = cbook._deprecate_privatize_attribute("3.3")
657654

658655
def _update(self):
659656
self.update_from(self.patch)

‎lib/mpl_toolkits/axes_grid1/axes_grid.py

Copy file name to clipboardExpand all lines: lib/mpl_toolkits/axes_grid1/axes_grid.py
+4-9Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,10 @@ def colorbar(self, mappable, *, ticks=None, **kwargs):
5858
self._config_axes()
5959
return cb
6060

61-
@cbook.deprecated("3.3", alternative="mappable.colorbar_cid")
62-
@property
63-
def cbid(self):
64-
return self._cbid
65-
66-
@cbook.deprecated("3.3", alternative=".colorbar().locator")
67-
@property
68-
def locator(self):
69-
return self._locator
61+
cbid = cbook._deprecate_privatize_attribute(
62+
"3.3", alternative="mappable.colorbar_cid")
63+
locator = cbook._deprecate_privatize_attribute(
64+
"3.3", alternative=".colorbar().locator")
7065

7166
def _config_axes(self):
7267
"""Make an axes patch and outline."""

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.