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 1b5fa40

Browse filesBrowse files
committed
Move toolmanager warning from logging to warning.
Using warnings.warn avoids emitting the warning once per Tool, i.e. a dozen times at each invocation. (Yes, the system is experimental, we got that part.) Also update the warning message (Matplotlib 2.1 is long past).
1 parent 9332a06 commit 1b5fa40
Copy full SHA for 1b5fa40

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎lib/matplotlib/backend_tools.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_tools.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,9 @@ class ToolBase(object):
7777
"""
7878

7979
def __init__(self, toolmanager, name):
80-
_log.warning('Treat the new Tool classes introduced in v1.5 as '
81-
'experimental for now, the API will likely change in '
82-
'version 2.1, and some tools might change name')
80+
cbook._warn_external(
81+
'The new Tool classes introduced in v1.5 are experimental; their '
82+
'API (including names) will likely change in future versions.')
8383
self._name = name
8484
self._toolmanager = toolmanager
8585
self._figure = None

0 commit comments

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