Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c1993d

Browse files
committed
Merge pull request #5017 from OceanWolf/MEP22-warnings
DOC: MEP22 warnings
2 parents b7ef642 + f5e43c1 commit 7c1993d

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

doc/users/whats_new/rcparams.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,9 @@ default), ``'left'``, ``'right'``, ``'bottom'``, ``'top'`` and ``'none'``.
6161
Added "toolmanager" to "toolbar" possible values
6262
````````````````````````````````````````````````
6363

64-
The new value enables the use of ``ToolManager``
64+
The new value enables the use of ``ToolManager``. Note at the moment we
65+
release this for feedback and should get treated as experimental until further
66+
notice.
6567

6668

6769
Added ``axes.labelpad``

doc/users/whats_new/toolmanager.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,10 @@ The `Toolbars` are replaced for `ToolContainers` that are just GUI interfaces to
1212

1313

1414
.. note::
15-
For the moment the `ToolManager` is working only with `GTK3` and `Tk` backends.
16-
Make sure you are using one of those.
15+
At the moment we release this primarily for feedback purposes and should
16+
get treated as experimental until further notice as API changes will occur.
17+
For the moment the `ToolManager` works only with the `GTK3` and `Tk` backends.
18+
Make sure you use one of those.
1719
Port for the rest of the backends is comming soon.
1820

1921
To activate the `ToolManager` include the following at the top of your file:

lib/matplotlib/backend_managers.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ class ToolManager(object):
5757
"""
5858

5959
def __init__(self, canvas):
60+
warnings.warn('Treat the new Tool classes introduced in v1.5 as ' +
61+
'experimental for now, the API will likely change in ' +
62+
'version 2.1 and perhaps the rcParam as well')
6063
self.canvas = canvas
6164

6265
self._key_press_handler_id = self.canvas.mpl_connect(

lib/matplotlib/backend_tools.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ class ToolBase(object):
7272
"""
7373

7474
def __init__(self, toolmanager, name):
75+
warnings.warn('Treat the new Tool classes introduced in v1.5 as ' +
76+
'experimental for now, the API will likely change in ' +
77+
'version 2.1, and some tools might change name')
7578
self._name = name
7679
self._figure = None
7780
self.toolmanager = toolmanager

0 commit comments

Comments
 (0)