From df751c49051b2412bfeee3595c735b09825bdf8d Mon Sep 17 00:00:00 2001 From: Eric Firing Date: Sat, 13 Oct 2012 13:49:15 -1000 Subject: [PATCH 1/2] Deprecate original NavigationToolbar --- lib/matplotlib/rcsetup.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/matplotlib/rcsetup.py b/lib/matplotlib/rcsetup.py index bebe143b16b7..ad9464b6d3b9 100644 --- a/lib/matplotlib/rcsetup.py +++ b/lib/matplotlib/rcsetup.py @@ -110,9 +110,17 @@ def validate_backend(s): validate_qt4 = ValidateInStrings('backend.qt4', ['PyQt4', 'PySide']) -validate_toolbar = ValidateInStrings('toolbar',[ - 'None','classic','toolbar2', - ], ignorecase=True) +def validate_toolbar(s): + validator = ValidateInStrings( + 'toolbar', + ['None','classic','toolbar2'], + ignorecase=True) + s = validator(s) + if s.lower == 'classic': + warnings.warn("'classic' Navigation Toolbar " + "is deprecated in v1.2.x and will be " + "removed in v1.3") + return s def validate_autolayout(v): if v: From 8ff503055c22fbff486eab599ad87f0ebef183c7 Mon Sep 17 00:00:00 2001 From: Eric Firing Date: Sun, 14 Oct 2012 09:12:17 -1000 Subject: [PATCH 2/2] Note deprecation of classic toolbar in api_changes and matplotlibrc.template --- doc/api/api_changes.rst | 3 +++ matplotlibrc.template | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index 9428198be246..f15e608c0596 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -14,6 +14,9 @@ For new features that were added to matplotlib, please see Changes in 1.2.x ================ +* The ``classic`` option of the rc parameter ``toolbar`` is deprecated + and will be removed in the next release. + * The :meth:`~matplotlib.cbook.isvector` method has been removed since it is no longer functional. diff --git a/matplotlibrc.template b/matplotlibrc.template index cdfa87760bd6..a77c89bb16e8 100644 --- a/matplotlibrc.template +++ b/matplotlibrc.template @@ -47,7 +47,7 @@ backend : %(backend)s #backend_fallback: True #interactive : False -#toolbar : toolbar2 # None | classic | toolbar2 +#toolbar : toolbar2 # None | toolbar2 ("classic" is deprecated) #timezone : UTC # a pytz timezone string, eg US/Central or Europe/Paris # Where your matplotlib data lives if you installed to a non-default