8000 API: deprecate unused helper in patch._Styles by tacaswell · Pull Request #28670 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

API: deprecate unused helper in patch._Styles #28670

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 2 commits into from
Aug 6, 2024
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
6 changes: 6 additions & 0 deletions doc/api/next_api_changes/deprecations/28670-TAC.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Deprecated ``register`` on ``matplotlib.patches._Styles`` and subclasses
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This class method is never used internally. Due to the internal check in the
method it only accepts subclasses of a private baseclass embedded in the host
class which makes it unlikely that it has been used externally.
5 changes: 5 additions & 0 deletions lib/matplotlib/patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -2347,6 +2347,11 @@ def pprint_styles(cls):
return textwrap.indent(rst_table, prefix=' ' * 4)

@classmethod
@_api.deprecated(
'3.10.0',
message="This method is never used internally.",
alternative="No replacement. Please open an issue if you use this."
)
def register(cls, name, style):
"""Register a new style."""
if not issubclass(style, cls._Base):
Expand Down
Loading
0