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

Skip to content

Commit 045b745

Browse files
authored
Merge pull request #23726 from meeseeksmachine/auto-backport-of-pr-23711-on-v3.6.x
Backport PR #23711 on branch v3.6.x (Fix deprecation messages for vendoring unused things)
2 parents 27377d5 + dd73ea5 commit 045b745

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
436436
raise ValueError("Unknown executable: {!r}".format(name))
437437

438438

439-
@_api.deprecated("3.6", alternative="Vendor the code")
439+
@_api.deprecated("3.6", alternative="a vendored copy of this function")
440440
def checkdep_usetex(s):
441441
if not s:
442442
return False

lib/matplotlib/backends/backend_pdf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
# * draw_quad_mesh
9393

9494

95-
@_api.deprecated("3.6", alternative="Vendor the code")
95+
@_api.deprecated("3.6", alternative="a vendored copy of _fill")
9696
def fill(strings, linelen=75):
9797
return _fill(strings, linelen=linelen)
9898

lib/matplotlib/backends/backend_ps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _nums_to_str(*args):
8787
return " ".join(f"{arg:1.3f}".rstrip("0").rstrip(".") for arg in args)
8888

8989

90-
@_api.deprecated("3.6", alternative="Vendor the code")
90+
@_api.deprecated("3.6", alternative="a vendored copy of this function")
9191
def quote_ps_string(s):
9292
"""
9393
Quote dangerous characters of S for use in a PostScript string constant.

lib/matplotlib/backends/backend_svg.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
# --------------------------------------------------------------------
6767

6868

69-
@_api.deprecated("3.6", alternative="Vendor the code")
69+
@_api.deprecated("3.6", alternative="a vendored copy of _escape_cdata")
7070
def escape_cdata(s):
7171
return _escape_cdata(s)
7272

@@ -81,7 +81,7 @@ def _escape_cdata(s):
8181
_escape_xml_comment = re.compile(r'-(?=-)')
8282

8383

84-
@_api.deprecated("3.6", alternative="Vendor the code")
84+
@_api.deprecated("3.6", alternative="a vendored copy of _escape_comment")
8585
def escape_comment(s):
8686
return _escape_comment.sub(s)
8787

@@ -91,7 +91,7 @@ def _escape_comment(s):
9191
return _escape_xml_comment.sub('- ', s)
9292

9393

94-
@_api.deprecated("3.6", alternative="Vendor the code")
94+
@_api.deprecated("3.6", alternative="a vendored copy of _escape_attrib")
9595
def escape_attrib(s):
9696
return _escape_attrib(s)
9797

@@ -111,7 +111,7 @@ def _quote_escape_attrib(s):
111111
'"' + _escape_attrib(s) + '"')
112112

113113

114-
@_api.deprecated("3.6", alternative="Vendor the code")
114+
@_api.deprecated("3.6", alternative="a vendored copy of _short_float_fmt")
115115
def short_float_fmt(x):
116116
return _short_float_fmt(x)
117117

lib/matplotlib/testing/decorators.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ def _cleanup_cm():
3232
plt.close("all")
3333

3434

35-
@_api.deprecated("3.6", alternative="Vendor the existing code, "
36-
"including the private function _cleanup_cm.")
35+
@_api.deprecated("3.6", alternative="a vendored copy of the existing code, "
36+
"including the private function _cleanup_cm")
3737
class CleanupTestCase(unittest.TestCase):
3838
"""A wrapper for unittest.TestCase that includes cleanup operations."""
3939
@classmethod
@@ -45,8 +45,8 @@ def tearDownClass(cls):
4545
cls._cm.__exit__(None, None, None)
4646

4747

48-
@_api.deprecated("3.6", alternative="Vendor the existing code, "
49-
"including the private function _cleanup_cm.")
48+
@_api.deprecated("3.6", alternative="a vendored copy of the existing code, "
49+
"including the private function _cleanup_cm")
5050
def cleanup(style=None):
5151
"""
5252
A decorator to ensure that any global state is reset before
@@ -88,8 +88,8 @@ def wrapped_callable(*args, **kwargs):
8888
return make_cleanup
8989

9090

91-
@_api.deprecated("3.6", alternative="Vendor the existing code "
92-
"of _check_freetype_version.")
91+
@_api.deprecated("3.6", alternative="a vendored copy of the existing code "
92+
"of _check_freetype_version")
9393
def check_freetype_version(ver):
9494
return _check_freetype_version(ver)
9595

lib/mpl_toolkits/mplot3d/axis3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from . import art3d, proj3d
1414

1515

16-
@_api.deprecated("3.6", alternative="Vendor the code of _move_from_center")
16+
@_api.deprecated("3.6", alternative="a vendored copy of _move_from_center")
1717
def move_from_center(coord, centers, deltas, axmask=(True, True, True)):
1818
"""
1919
For each coordinate where *axmask* is True, move *coord* away from
@@ -31,7 +31,7 @@ def _move_from_center(coord, centers, deltas, axmask=(True, True, True)):
3131
return coord + axmask * np.copysign(1, coord - centers) * deltas
3232

3333

34-
@_api.deprecated("3.6", alternative="Vendor the code of _tick_update_position")
34+
@_api.deprecated("3.6", alternative="a vendored copy of _tick_update_position")
3535
def tick_update_position(tick, tickxs, tickys, labelpos):
3636
"""Update tick line and label position and style."""
3737
_tick_update_position(tick, tickxs, tickys, labelpos)

0 commit comments

Comments
 (0)