Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3d461d9

Browse files
committed
Deprecated docstring and updated references
1 parent 6817a46 commit 3d461d9

32 files changed

+194
-189
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Module ``docstring`` deprecated
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The module ``matplotlib.docstring`` is considered internal and public access
5+
is deprecated.

lib/matplotlib/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106

107107
# cbook must import matplotlib only within function
108108
# definitions, so it is safe to import from it here.
109-
from . import _api, _version, cbook, docstring, rcsetup
109+
from . import _api, _version, cbook, _docstring, rcsetup
110110
from matplotlib.cbook import MatplotlibDeprecationWarning, sanitize_sequence
111111
from matplotlib.cbook import mplDeprecation # deprecated
112112
from matplotlib.rcsetup import validate_backend, cycler
@@ -593,7 +593,7 @@ def gen_candidates():
593593
_deprecated_remain_as_none = {}
594594

595595

596-
@docstring.Substitution(
596+
@_docstring.Substitution(
597597
"\n".join(map("- {}".format, sorted(rcsetup._validators, key=str.lower)))
598598
)
599599
class RcParams(MutableMapping, dict):

lib/matplotlib/_enums.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212

1313
from enum import Enum, auto
14-
from matplotlib import docstring
14+
from matplotlib import _docstring
1515

1616

1717
class _AutoStringNameEnum(Enum):
@@ -179,5 +179,5 @@ def demo():
179179
+ ", ".join([f"'{cs.name}'" for cs in CapStyle]) \
180180
+ "}"
181181

182-
docstring.interpd.update({'JoinStyle': JoinStyle.input_description,
182+
_docstring.interpd.update({'JoinStyle': JoinStyle.input_description,
183183
'CapStyle': CapStyle.input_description})

0 commit comments

Comments
 (0)