Skip to content

Commit

Permalink
Merge pull request #1946 from tacaswell/mpldeprec_imports
Browse files Browse the repository at this point in the history
re-arrange mplDeprecation imports
  • Loading branch information
efiring committed Apr 29, 2013
2 parents d94036c + ab6e9ab commit 3b972d6
Show file tree
Hide file tree
Showing 12 changed files with 21 additions and 11 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG
@@ -1,3 +1,14 @@
2013-04-25 Changed all instances of:

from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
to:

from cbook import mplDeprecation

and removed the import into the matplotlib namespace in __init__.py
Thomas Caswell


2013-04-15 Added 'axes.xmargin' and 'axes.ymargin' to rpParams to set default
margins on auto-scaleing. - TAC

Expand Down
1 change: 0 additions & 1 deletion lib/matplotlib/__init__.py
Expand Up @@ -130,7 +130,6 @@

# cbook must import matplotlib only within function
# definitions, so it is safe to import from it here.
from matplotlib.cbook import MatplotlibDeprecationWarning
from matplotlib.cbook import is_string_like
from matplotlib.compat import subprocess

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/axes.py
Expand Up @@ -37,7 +37,7 @@
import matplotlib.ticker as mticker
import matplotlib.transforms as mtransforms
import matplotlib.tri as mtri
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation
from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer

iterable = cbook.iterable
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backend_bases.py
Expand Up @@ -49,7 +49,7 @@
import matplotlib.tight_bbox as tight_bbox
import matplotlib.textpath as textpath
from matplotlib.path import Path
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation

try:
from PIL import Image
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_qt.py
Expand Up @@ -4,7 +4,7 @@
import sys
import warnings

from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation

warnings.warn("QT3-based backends are deprecated and will be removed after"
" the v1.2.x release. Use the equivalent QT4 backend instead.",
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/backends/backend_wx.py
Expand Up @@ -25,7 +25,7 @@

import numpy as np

from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation

# Debugging settings here...
# Debug level set here. If the debug level is less than 5, information
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/legend.py
Expand Up @@ -31,7 +31,7 @@
from matplotlib.offsetbox import DraggableOffsetBox

from matplotlib.container import ErrorbarContainer, BarContainer, StemContainer
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation
import legend_handler


Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/mlab.py
Expand Up @@ -148,7 +148,7 @@
import numpy as np
ma = np.ma
from matplotlib import verbose
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation

import matplotlib.cbook as cbook
from matplotlib import docstring
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/mpl.py
Expand Up @@ -2,7 +2,7 @@
.. note:: Deprecated in 1.3
"""
import warnings
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation
warnings.warn(
"matplotlib.mpl is deprecated and will be removed in version 1.4."
"Please use `import matplotlib as mpl` instead", mplDeprecation)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/nxutils.py
@@ -1,7 +1,7 @@
import warnings

from matplotlib import path
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation

def pnpoly(x, y, xyverts):
"""
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/patches.py
Expand Up @@ -12,7 +12,7 @@
from matplotlib import docstring
import matplotlib.transforms as transforms
from matplotlib.path import Path
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation

# these are not available for the object inspector until after the
# class is built so we define an initial set here for the init
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/widgets.py
Expand Up @@ -16,7 +16,7 @@
from patches import Circle, Rectangle
from lines import Line2D
from transforms import blended_transform_factory
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
from matplotlib.cbook import mplDeprecation


class LockDraw:
Expand Down

0 comments on commit 3b972d6

Please sign in to comment.