Skip to content

Commit

Permalink
Merge pull request #1670 from dmcdougall/deprecate_mpl
Browse files Browse the repository at this point in the history
Deprecate mpl
  • Loading branch information
dmcdougall committed Jan 17, 2013
2 parents e0325c8 + 088677c commit 78ce67d
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG
Expand Up @@ -17,6 +17,9 @@
This allows backends to utilize additional text attributes, like
the alignment of text elements. - pwuertz

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-16 plt.set_cmap no longer throws errors if there is not already
an active colorable artist, such as an image, and just sets
up the colormap to use from that point forward. - PI
Expand Down
3 changes: 3 additions & 0 deletions doc/api/api_changes.rst
Expand Up @@ -24,6 +24,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
================

Expand Down
8 changes: 8 additions & 0 deletions lib/matplotlib/mpl.py
@@ -1,3 +1,11 @@
"""
.. note:: Deprecated in 1.3
"""
import warnings
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
warnings.warn(
"matplotlib.mpl is deprecated and will be removed in version 1.4."
"Please use `import matplotlib as mpl` instead", mplDeprecation)
from matplotlib import artist
from matplotlib import axis
from matplotlib import axes
Expand Down
5 changes: 4 additions & 1 deletion lib/matplotlib/pylab.py
Expand Up @@ -219,7 +219,10 @@
from matplotlib.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,\
Expand Down

0 comments on commit 78ce67d

Please sign in to comment.