Skip to content

Fix deprecation messages for vendoring unused things #23711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
raise ValueError("Unknown executable: {!r}".format(name))


@_api.deprecated("3.6", alternative="Vendor the code")
@_api.deprecated("3.6", alternative="a vendored copy of this function")
def checkdep_usetex(s):
if not s:
return False
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
# * draw_quad_mesh


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

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def _nums_to_str(*args):
return " ".join(f"{arg:1.3f}".rstrip("0").rstrip(".") for arg in args)


@_api.deprecated("3.6", alternative="Vendor the code")
@_api.deprecated("3.6", alternative="a vendored copy of this function")
def quote_ps_string(s):
"""
Quote dangerous characters of S for use in a PostScript string constant.
Expand Down
8 changes: 4 additions & 4 deletions lib/matplotlib/backends/backend_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
# --------------------------------------------------------------------


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

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


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

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


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

Expand All @@ -111,7 +111,7 @@ def _quote_escape_attrib(s):
'"' + _escape_attrib(s) + '"')


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

Expand Down
12 changes: 6 additions & 6 deletions lib/matplotlib/testing/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def _cleanup_cm():
plt.close("all")


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


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


@_api.deprecated("3.6", alternative="Vendor the existing code "
"of _check_freetype_version.")
@_api.deprecated("3.6", alternative="a vendored copy of the existing code "
"of _check_freetype_version")
def check_freetype_version(ver):
return _check_freetype_version(ver)

Expand Down
4 changes: 2 additions & 2 deletions lib/mpl_toolkits/mplot3d/axis3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from . import art3d, proj3d


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


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