From 39bdf393f0b53a2403dac614a82362ec28edcb9b Mon Sep 17 00:00:00 2001 From: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Date: Thu, 4 Oct 2018 01:04:11 +0200 Subject: [PATCH] Deprecate to-days converters in matplotlib dates --- doc/api/next_api_changes/2018-10-04-TH-deprecations.rst | 7 +++++++ lib/matplotlib/dates.py | 4 ++++ 2 files changed, 11 insertions(+) create mode 100644 doc/api/next_api_changes/2018-10-04-TH-deprecations.rst diff --git a/doc/api/next_api_changes/2018-10-04-TH-deprecations.rst b/doc/api/next_api_changes/2018-10-04-TH-deprecations.rst new file mode 100644 index 000000000000..763fda67195e --- /dev/null +++ b/doc/api/next_api_changes/2018-10-04-TH-deprecations.rst @@ -0,0 +1,7 @@ +API deprecations +```````````````` + +The following API elements are deprecated: + +- ``dates.seconds()``, ``dates.minutes()``, ``dates.hours()``, + ``dates.weeks()`` diff --git a/lib/matplotlib/dates.py b/lib/matplotlib/dates.py index 41f78ca98abb..5029fd667928 100644 --- a/lib/matplotlib/dates.py +++ b/lib/matplotlib/dates.py @@ -1728,6 +1728,7 @@ def date_ticker_factory(span, tz=None, numticks=5): return locator, formatter +@cbook.deprecated("3.1") def seconds(s): """ Return seconds as days. @@ -1735,6 +1736,7 @@ def seconds(s): return s / SEC_PER_DAY +@cbook.deprecated("3.1") def minutes(m): """ Return minutes as days. @@ -1742,6 +1744,7 @@ def minutes(m): return m / MINUTES_PER_DAY +@cbook.deprecated("3.1") def hours(h): """ Return hours as days. @@ -1749,6 +1752,7 @@ def hours(h): return h / HOURS_PER_DAY +@cbook.deprecated("3.1") def weeks(w): """ Return weeks as days.