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

Skip to content

Added deprecation notices for Qt3-based backends. #1225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 10, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions doc/api/api_changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,11 @@ Changes in 1.2.x
* ``twinx`` and ``twiny`` now returns an instance of SubplotBase if
parent axes is an instance of SubplotBase.

* All Qt3-based backends are now deprecated due to the lack of py3k bindings.
Qt and QtAgg backends will continue to work in v1.2.x for py2.6
and py2.7. It is anticipated that the Qt3 support will be completely
removed for the next release.


Changes in 1.1.x
================
Expand Down
3 changes: 2 additions & 1 deletion doc/users/whats_new.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ project.
The following GUI backends work under Python 3.x: Gtk3Agg, Gtk3Cairo,
Qt4Agg, TkAgg and MacOSX. The other GUI backends do not yet have
adequate bindings for Python 3.x, but continue to work on Python 2.6
and 2.7. The non-GUI backends, such as PDF, PS and SVG, work on both
and 2.7, particularly the Qt and QtAgg backends (which have been
deprecated). The non-GUI backends, such as PDF, PS and SVG, work on both
Python 2.x and 3.x.

Features that depend on the Python Imaging Library, such as JPEG
Expand Down
9 changes: 8 additions & 1 deletion lib/matplotlib/backends/backend_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
import math
import os
import sys
import warnings

warnings.warn("QT3-based backends are deprecated and will be removed after"
" the v1.2.x release. Use the equivalent QT4 backend instead.",
DeprecationWarning)

import matplotlib
from matplotlib import verbose
Expand All @@ -18,7 +23,9 @@
try:
import qt
except ImportError:
raise ImportError("Qt backend requires pyqt to be installed.")
raise ImportError("Qt backend requires pyqt to be installed."
" NOTE: QT3-based backends will not work in"
" Python 3.")

backend_version = "0.9.1"
def fn_name(): return sys._getframe(1).f_code.co_name
Expand Down