Skip to content

Commit a27b73c

Browse files
authored
Merge pull request matplotlib#16686 from anntzer/sfp
Deprecate Substitution.from_params.
2 parents 8094fb1 + e84ac90 commit a27b73c

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

doc/api/next_api_changes/deprecations.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,3 +333,8 @@ In :mod:`mpl_toolkits.axes_grid1.axes_rgb`, ``imshow_rgb`` is deprecated (use
333333
``ax.imshow(np.dstack([r, g, b]))`` instead); ``RGBAxesBase`` is deprecated
334334
(use ``RGBAxes`` instead); ``RGBAxes.add_RGB_to_figure`` is deprecated (it was
335335
an internal helper).
336+
337+
``Substitution.from_params``
338+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
339+
This method is deprecated. If needed, directly assign to the ``params``
340+
attribute of the Substitution object.

lib/matplotlib/docstring.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import inspect
22

3+
from matplotlib import cbook
4+
35

46
class Substitution:
57
"""
@@ -45,6 +47,7 @@ def update(self, *args, **kwargs):
4547
self.params.update(*args, **kwargs)
4648

4749
@classmethod
50+
@cbook.deprecated("3.3", alternative="assign to the params attribute")
4851
def from_params(cls, params):
4952
"""
5053
In the case where the params is a mutable sequence (list or

0 commit comments

Comments
 (0)