Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3b972d6

Browse filesBrowse files
committed
Merge pull request #1946 from tacaswell/mpldeprec_imports
re-arrange mplDeprecation imports
2 parents d94036c + ab6e9ab commit 3b972d6
Copy full SHA for 3b972d6

File tree

Expand file treeCollapse file tree

12 files changed

+21
-11
lines changed
Filter options
Expand file treeCollapse file tree

12 files changed

+21
-11
lines changed

‎CHANGELOG

Copy file name to clipboardExpand all lines: CHANGELOG
+11Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
2013-04-25 Changed all instances of:
2+
3+
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
4+
to:
5+
6+
from cbook import mplDeprecation
7+
8+
and removed the import into the matplotlib namespace in __init__.py
9+
Thomas Caswell
10+
11+
112
2013-04-15 Added 'axes.xmargin' and 'axes.ymargin' to rpParams to set default
213
margins on auto-scaleing. - TAC
314

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@
130130

131131
# cbook must import matplotlib only within function
132132
# definitions, so it is safe to import from it here.
133-
from matplotlib.cbook import MatplotlibDeprecationWarning
134133
from matplotlib.cbook import is_string_like
135134
from matplotlib.compat import subprocess
136135

‎lib/matplotlib/axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
import matplotlib.ticker as mticker
3838
import matplotlib.transforms as mtransforms
3939
import matplotlib.tri as mtri
40-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
40+
from matplotlib.cbook import mplDeprecation
4141
from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer
4242

4343
iterable = cbook.iterable

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
import matplotlib.tight_bbox as tight_bbox
5050
import matplotlib.textpath as textpath
5151
from matplotlib.path import Path
52-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
52+
from matplotlib.cbook import mplDeprecation
5353

5454
try:
5555
from PIL import Image

‎lib/matplotlib/backends/backend_qt.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_qt.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import sys
55
import warnings
66

7-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
7+
from matplotlib.cbook import mplDeprecation
88

99
warnings.warn("QT3-based backends are deprecated and will be removed after"
1010
" the v1.2.x release. Use the equivalent QT4 backend instead.",

‎lib/matplotlib/backends/backend_wx.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_wx.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import numpy as np
2727

28-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
28+
from matplotlib.cbook import mplDeprecation
2929

3030
# Debugging settings here...
3131
# Debug level set here. If the debug level is less than 5, information

‎lib/matplotlib/legend.py

Copy file name to clipboardExpand all lines: lib/matplotlib/legend.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from matplotlib.offsetbox import DraggableOffsetBox
3232

3333
from matplotlib.container import ErrorbarContainer, BarContainer, StemContainer
34-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
34+
from matplotlib.cbook import mplDeprecation
3535
import legend_handler
3636

3737

‎lib/matplotlib/mlab.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mlab.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
import numpy as np
149149
ma = np.ma
150150
from matplotlib import verbose
151-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
151+
from matplotlib.cbook import mplDeprecation
152152

153153
import matplotlib.cbook as cbook
154154
from matplotlib import docstring

‎lib/matplotlib/mpl.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mpl.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
.. note:: Deprecated in 1.3
33
"""
44
import warnings
5-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
5+
from matplotlib.cbook import mplDeprecation
66
warnings.warn(
77
"matplotlib.mpl is deprecated and will be removed in version 1.4."
88
"Please use `import matplotlib as mpl` instead", mplDeprecation)

‎lib/matplotlib/nxutils.py

Copy file name to clipboardExpand all lines: lib/matplotlib/nxutils.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import warnings
22

33
from matplotlib import path
4-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
4+
from matplotlib.cbook import mplDeprecation
55

66
def pnpoly(x, y, xyverts):
77
"""

‎lib/matplotlib/patches.py

Copy file name to clipboardExpand all lines: lib/matplotlib/patches.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from matplotlib import docstring
1313
import matplotlib.transforms as transforms
1414
from matplotlib.path import Path
15-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
15+
from matplotlib.cbook import mplDeprecation
1616

1717
# these are not available for the object inspector until after the
1818
# class is built so we define an initial set here for the init

‎lib/matplotlib/widgets.py

Copy file name to clipboardExpand all lines: lib/matplotlib/widgets.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from patches import Circle, Rectangle
1717
from lines import Line2D
1818
from transforms import blended_transform_factory
19-
from matplotlib import MatplotlibDeprecationWarning as mplDeprecation
19+
from matplotlib.cbook import mplDeprecation
2020

2121

2222
class LockDraw:

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.