From 0ed373ecd94d9a6f02f46ff3a7e3500aa2db6adf Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Tue, 12 Nov 2019 22:24:32 +0100 Subject: [PATCH] Deprecate unused illegal_s attribute. It should have been removed together with the mpl3.0 deprecated APIs cleanup. --- doc/api/next_api_changes/deprecations.rst | 4 ++++ lib/matplotlib/dates.py | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/api/next_api_changes/deprecations.rst b/doc/api/next_api_changes/deprecations.rst index 70e1b8522b6f..66a153a696b5 100644 --- a/doc/api/next_api_changes/deprecations.rst +++ b/doc/api/next_api_changes/deprecations.rst @@ -59,3 +59,7 @@ Passing raw data via parameters *data* and *lut* to `.register_cmap()` is deprecated. Instead, explicitly create a `.LinearSegmentedColormap` and pass it via the *cmap* parameter: ``register_cmap(cmap=LinearSegmentedColormap(name, data, lut))``. + +``DateFormatter.illegal_s`` +~~~~~~~~~~~~~~~~~~~~~~~~~~~ +This attribute is unused and deprecated. diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py index 1587882445f6..127b62c015a9 100644 --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -572,7 +572,10 @@ class DateFormatter(ticker.Formatter): `~datetime.datetime.strftime` format string. """ - illegal_s = re.compile(r"((^|[^%])(%%)*%s)") + @cbook.deprecated("3.3") + @property + def illegal_s(self): + return re.compile(r"((^|[^%])(%%)*%s)") def __init__(self, fmt, tz=None): """