Skip to content

Commit d631dc1

Browse files
committed
use warn_deprecated
1 parent 2791451 commit d631dc1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
import matplotlib.tight_bbox as tight_bbox
6161
import matplotlib.textpath as textpath
6262
from matplotlib.path import Path
63-
from matplotlib.cbook import mplDeprecation
63+
from matplotlib.cbook import mplDeprecation, warn_deprecated
6464
import matplotlib.backend_tools as tools
6565

6666
try:
@@ -2332,9 +2332,10 @@ def on_press(event):
23322332
23332333
"""
23342334
if s == 'idle_event':
2335-
warnings.warn("idle_event is only implemented for the wx backend, "
2336-
"and will be removed in matplotlib 2.1. Use the "
2337-
"animations module instead.", mplDeprecation)
2335+
warn_deprecated(1.5,
2336+
"idle_event is only implemented for the wx backend, and will "
2337+
"be removed in matplotlib 2.1. Use the animations module "
2338+
"instead.")
23382339

23392340
return self.callbacks.connect(s, func)
23402341

0 commit comments

Comments
 (0)