8000 FIX: deprecate qt4/5 rcparams · matplotlib/matplotlib@17112e8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 17112e8

Browse files
committed
FIX: deprecate qt4/5 rcparams
1 parent 482bde0 commit 17112e8

File tree

3 files changed

+8
-14
lines changed

3 files changed

+8
-14
lines changed

lib/matplotlib/rcsetup.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ def validate_qt4(s):
271271
# reset. While it may seem better to use filterwarnings from within the
272272
# test suite, pytest 3.1+ explicitly disregards warnings filters (pytest
273273
# issue #2430).
274+
if s is None:
275+
return 'PyQt4'
274276
if not testing.is_called_from_pytest():
275277
cbook.warn_deprecated(
276278
"2.2",
@@ -282,6 +284,8 @@ def validate_qt4(s):
282284

283285
def validate_qt5(s):
284286
# See comment re: validate_qt4.
287+
if s is None:
28 8000 8+
return 'PyQt5'
285289
if not testing.is_called_from_pytest():
286290
cbook.warn_deprecated(
287291
"2.2",
@@ -958,8 +962,8 @@ def _validate_linestyle(ls):
958962
'backend': ['Agg', validate_backend], # agg is certainly
959963
# present
960964
'backend_fallback': [True, validate_bool], # agg is certainly present
961-
'backend.qt4': ['PyQt4', validate_qt4],
962-
'backend.qt5': ['PyQt5', validate_qt5],
965+
'backend.qt4': [None, validate_qt4],
966+
'backend.qt5': [None, validate_qt5],
963967
'webagg.port': [8988, validate_int],
964968
'webagg.address': ['127.0.0.1', validate_webagg_address],
965969
'webagg.open_in_browser': [True, validate_bool],

matplotlibrc.template

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,6 @@
4040
# non-interactive backend.
4141
backend : $TEMPLATE_BACKEND
4242

43-
# If you are using the Qt4Agg backend, you can choose here
44-
# to use the PyQt4 bindings or the newer PySide bindings to
45-
# the underlying Qt4 toolkit.
46-
#backend.qt4 : PyQt4 # PyQt4 | PySide
47-
4843
# Note that this can be overridden by the environment variable
4944
# QT_API used by Enthought Tool Suite (ETS); valid values are
5045
# "pyqt" and "pyside". The "pyqt" setting has the side effect of

tutorials/introductory/usage.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -495,13 +495,8 @@ def my_plotter(ax, data1, data2, param_dict):
495495
# How do I select PyQt4 or PySide?
496496
# --------------------------------
497497
#
498-
# You can choose either PyQt4 or PySide when using the `qt4` backend by setting
499-
# the appropriate value for `backend.qt4` in your :file:`matplotlibrc` file. The
500-
# default value is `PyQt4`.
501-
#
502-
# The setting in your :file:`matplotlibrc` file can be overridden by setting the
503-
# `QT_API` environment variable to either `pyqt` or `pyside` to use `PyQt4` or
504-
# `PySide`, respectively.
498+
# The `QT_API` environment variable can be set to either `pyqt` or `pyside`
499+
# to use `PyQt4` or `PySide`, respectively.
505500
#
506501
# Since the default value for the bindings to be used is `PyQt4`,
507502
# :mod:`matplotlib` first tries to import it, if the import fails, it tries to

0 commit comments

Comments
 (0)
0