Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate mpl.py (was Remove mpl.py) #1535

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions 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. 2012-11-13 Add a symmetric log normalization class to colors.py.
Also added some tests for the normalization class. Also added some tests for the normalization class.
Till Stensitzki Till Stensitzki
Expand Down
3 changes: 3 additions & 0 deletions doc/api/api_changes.rst
Expand Up @@ -19,6 +19,9 @@ Changes in 1.3.x
:class:`~matplotlib.colorbar.ColorbarBase` allows one to control the shape :class:`~matplotlib.colorbar.ColorbarBase` allows one to control the shape
of colorbar extensions. 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 Changes in 1.2.x
================ ================


Expand Down
5 changes: 5 additions & 0 deletions 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 artist
from matplotlib import axis from matplotlib import axis
from matplotlib import axes from matplotlib import axes
Expand Down
5 changes: 4 additions & 1 deletion lib/matplotlib/pylab.py
Expand Up @@ -219,7 +219,10 @@
from cbook import flatten, is_string_like, exception_to_str, \ from cbook import flatten, is_string_like, exception_to_str, \
silent_list, iterable, dedent 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,\ from matplotlib.dates import date2num, num2date,\
datestr2num, strpdate2num, drange,\ datestr2num, strpdate2num, drange,\
Expand Down