From 79c6966f77a0f6ee5cad587f94f4229adbc08ba6 Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Mon, 17 Oct 2016 14:18:50 -0700 Subject: [PATCH 1/2] MAINT finance module is deprecated --- lib/matplotlib/finance.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/matplotlib/finance.py b/lib/matplotlib/finance.py index 6fdd1b6367ec..9fb4dee0cc91 100644 --- a/lib/matplotlib/finance.py +++ b/lib/matplotlib/finance.py @@ -2,7 +2,7 @@ A collection of functions for collecting, analyzing and plotting financial data. User contributions welcome! -This module is deprecated in 1.4 and will be moved to `mpl_toolkits` +This module is deprecated in 2.0 and will be moved to `mpl_toolkits` or it's own project in the future. """ @@ -23,12 +23,18 @@ from matplotlib import colors as mcolors, verbose, get_cachedir from matplotlib.dates import date2num -from matplotlib.cbook import iterable, mkdirs +from matplotlib.cbook import iterable, mkdirs, warn_deprecated from matplotlib.collections import LineCollection, PolyCollection from matplotlib.lines import Line2D, TICKLEFT, TICKRIGHT from matplotlib.patches import Rectangle from matplotlib.transforms import Affine2D +warn_deprecated( + since=2.0, + message=("The finance module has been deprecated in mpl 2.0 and will " + "be removed in mpl 2.2. Please use the matplotlib toolkit " + "finance instead.")) + if six.PY3: import hashlib From 905b69528d6eaa5f6e5883de2d7dcb2d420bf0ab Mon Sep 17 00:00:00 2001 From: Nelle Varoquaux Date: Mon, 17 Oct 2016 20:33:33 -0700 Subject: [PATCH 2/2] DOC updated finance's docstring --- lib/matplotlib/finance.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/matplotlib/finance.py b/lib/matplotlib/finance.py index 9fb4dee0cc91..a7f8dcf3d01f 100644 --- a/lib/matplotlib/finance.py +++ b/lib/matplotlib/finance.py @@ -1,10 +1,9 @@ """ A collection of functions for collecting, analyzing and plotting -financial data. User contributions welcome! - -This module is deprecated in 2.0 and will be moved to `mpl_toolkits` -or it's own project in the future. +financial data. +This module is deprecated in 2.0 and has been moved to a mpl_toolkit called +`finance`. """ from __future__ import (absolute_import, division, print_function, unicode_literals)