diff --git a/CHANGELOG b/CHANGELOG index 19f1e06299fc..0cd6fa685cac 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ + +2012-11-26 deprecate matplotlib/mpl.py, which was used only in pylab.py and is + now replaced by the more suitable `import matplotlib as mpl`. - PI + 2012-11-13 Add a symmetric log normalization class to colors.py. Also added some tests for the normalization class. Till Stensitzki diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 2bd2de115a28..f6b311774f84 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -19,6 +19,9 @@ Changes in 1.3.x :class:`~matplotlib.colorbar.ColorbarBase` allows one to control the shape of colorbar extensions. +* The `~matplotlib.mpl` module is now deprecated. Those who relied on this + module should transition to simply using `import matplotlib as mpl`. + Changes in 1.2.x ================ diff --git a/lib/matplotlib/mpl.py b/lib/matplotlib/mpl.py index 50f317f101d9..969a0dc4b380 100644 --- a/lib/matplotlib/mpl.py +++ b/lib/matplotlib/mpl.py @@ -1,3 +1,8 @@ +import warnings +from matplotlib import MatplotlibDeprecationWarning as mplDeprecation +warnings.warn( + "matplotlib.mpl is deprecated and will be removed in the next release." + "Please use `import matplotlib as mpl` instead", mplDeprecation) from matplotlib import artist from matplotlib import axis from matplotlib import axes diff --git a/lib/matplotlib/pylab.py b/lib/matplotlib/pylab.py index 2111d4fa734d..bc7333a51b54 100644 --- a/lib/matplotlib/pylab.py +++ b/lib/matplotlib/pylab.py @@ -219,7 +219,10 @@ from cbook import flatten, is_string_like, exception_to_str, \ silent_list, iterable, dedent -from matplotlib import mpl # pulls in most modules +import matplotlib as mpl +# make mpl.finance module available for backwards compatability, in case folks +# using pylab interface depended on not having to import it +import matplotlib.finance from matplotlib.dates import date2num, num2date,\ datestr2num, strpdate2num, drange,\