Skip to content

Commit

Permalink
Merge pull request #2371 from ianthomas23/warn_deprecated_correction
Browse files Browse the repository at this point in the history
Corrections to cbook.warn_deprecated calls().
  • Loading branch information
mdboom committed Sep 4, 2013
2 parents 1fa7400 + ec486d7 commit 8bad5f7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/matplotlib/axes.py
Expand Up @@ -6281,7 +6281,8 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
edgecolors = kwargs.get('edgecolors', None)
if faceted is not None:
cbook.warn_deprecated(
'1.2', 'faceted', alternative='edgecolor', obj_type='option')
'1.2', name='faceted', alternative='edgecolor',
obj_type='option')
if faceted:
edgecolors = None
else:
Expand Down Expand Up @@ -7537,7 +7538,8 @@ def pcolor(self, *args, **kwargs):
vmax = kwargs.pop('vmax', None)
if 'shading' in kwargs:
cbook.warn_deprecated(
'1.2', 'shading', alternative='edgecolors', obj_type='option')
'1.2', name='shading', alternative='edgecolors',
obj_type='option')
shading = kwargs.pop('shading', 'flat')

X, Y, C = self._pcolorargs('pcolor', *args, allmatch=False)
Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/cbook.py
Expand Up @@ -117,7 +117,7 @@ def new_function():
The object type being deprecated.
"""
message = _generate_deprecation_message(
since, message, name, alternative, pending, 'function')
since, message, name, alternative, pending, obj_type)

warnings.warn(message, mplDeprecation, stacklevel=1)

Expand Down
2 changes: 1 addition & 1 deletion lib/matplotlib/mpl.py
Expand Up @@ -4,7 +4,7 @@
import warnings
from matplotlib import cbook
cbook.warn_deprecated(
'1.3', 'matplotlib.mpl', alternative='`import matplotlib as mpl`',
'1.3', name='matplotlib.mpl', alternative='`import matplotlib as mpl`',
obj_type='module')
from matplotlib import artist
from matplotlib import axis
Expand Down

0 comments on commit 8bad5f7

Please sign in to comment.