From 3b67b1d92f3ed330bb7685f14ad03f2bc780d4d5 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Mon, 30 Jun 2014 22:41:12 -0400 Subject: [PATCH] MNT : replace and deprecated qt4_compat As part of the work to support qt5 qt4_compat got renamed to qt_compat. Replaced the module for graceful deprecation. Closes #3172 --- doc/api/api_changes.rst | 5 +++++ lib/matplotlib/backends/qt4_compat.py | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100644 lib/matplotlib/backends/qt4_compat.py diff --git a/doc/api/api_changes.rst b/doc/api/api_changes.rst index acebb681d127..c73ac8f3d706 100644 --- a/doc/api/api_changes.rst +++ b/doc/api/api_changes.rst @@ -50,6 +50,11 @@ original location: - mstream -> `from matplotlib import stream as mstream` - mtable -> `from matplotlib import table as mtable` +* As part of the refactoring to enable Qt5 support, the module + `matplotlib.backends.qt4_compat` was renamed to + `matplotlib.qt_compat`. `qt4_compat` is deprecated in 1.4 and + will be removed in 1.5. + * The :func:`~matplotlib.pyplot.errorbar` method has been changed such that the upper and lower limits (*lolims*, *uplims*, *xlolims*, *xuplims*) now point in the correct direction. diff --git a/lib/matplotlib/backends/qt4_compat.py b/lib/matplotlib/backends/qt4_compat.py new file mode 100644 index 000000000000..e28a479c434d --- /dev/null +++ b/lib/matplotlib/backends/qt4_compat.py @@ -0,0 +1,11 @@ +import warnings +from matplotlib.cbook import mplDeprecation +_warn_str = ("This module has been deprecated in 1.4 in favor " + "matplotlib.backends.qt_compat\n" + "This module will be removed in 1.5, please update " + "your imports.") +# bulk-imports because we are pretending that file is this file +from .qt_compat import * + + +warnings.warn(_warn_str, mplDeprecation)