From 9d119f71ad0b2b9d3c2fdc4603f9358db84f1051 Mon Sep 17 00:00:00 2001 From: Oscar Gustafsson Date: Sat, 10 Dec 2022 14:36:23 +0100 Subject: [PATCH] Deprecate quiver_doc and barbs_doc class members --- doc/api/next_api_changes/deprecations/24688-OG.rst | 5 +++++ lib/matplotlib/quiver.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 doc/api/next_api_changes/deprecations/24688-OG.rst diff --git a/doc/api/next_api_changes/deprecations/24688-OG.rst b/doc/api/next_api_changes/deprecations/24688-OG.rst new file mode 100644 index 000000000000..12bed4f04e52 --- /dev/null +++ b/doc/api/next_api_changes/deprecations/24688-OG.rst @@ -0,0 +1,5 @@ +``Quiver.quiver_doc`` and ``Barbs.barbs_doc`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +... are deprecated. These are the doc-string and should not be accessible as +a named class member. diff --git a/lib/matplotlib/quiver.py b/lib/matplotlib/quiver.py index c8c66a9e4a2e..c6e51afc0aaa 100644 --- a/lib/matplotlib/quiver.py +++ b/lib/matplotlib/quiver.py @@ -722,7 +722,7 @@ def _h_arrows(self, length): # Mask handling is deferred to the caller, _make_verts. return X, Y - quiver_doc = _quiver_doc + quiver_doc = _api.deprecated("3.7")(property(lambda self: _quiver_doc)) _barbs_doc = r""" @@ -1179,4 +1179,4 @@ def set_offsets(self, xy): super().set_offsets(xy) self.stale = True - barbs_doc = _barbs_doc + barbs_doc = _api.deprecated("3.7")(property(lambda self: _barbs_doc))