Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 3cce6f8

Browse filesBrowse files
committed
FIX: deprecate qt4/5 rcparams
1 parent 17112e8 commit 3cce6f8
Copy full SHA for 3cce6f8

File tree

Expand file treeCollapse file tree

1 file changed

+12
-17
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+12
-17
lines changed

‎lib/matplotlib/rcsetup.py

Copy file name to clipboardExpand all lines: lib/matplotlib/rcsetup.py
+12-17Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -267,31 +267,26 @@ def validate_backend(s):
267267

268268

269269
def validate_qt4(s):
270-
# Don't spam the test suite with warnings every time the rcparams are
271-
# reset. While it may seem better to use filterwarnings from within the
272-
# test suite, pytest 3.1+ explicitly disregards warnings filters (pytest
273-
# issue #2430).
274270
if s is None:
271+
# return a reasonable default for deprecation period
275272
return 'PyQt4'
276-
if not testing.is_called_from_pytest():
277-
cbook.warn_deprecated(
278-
"2.2",
279-
"The backend.qt4 rcParam was deprecated in version 2.2. In order "
280-
"to force the use of a specific Qt4 binding, either import that "
281-
"binding first, or set the QT_API environment variable.")
273+
cbook.warn_deprecated(
274+
"2.2",
275+
"The backend.qt4 rcParam was deprecated in version 2.2. In order "
276+
"to force the use of a specific Qt4 binding, either import that "
277+
"binding first, or set the QT_API environment variable.")
282278
return ValidateInStrings("backend.qt4", ['PyQt4', 'PySide', 'PyQt4v2'])(s)
283279

284280

285281
def validate_qt5(s):
286-
# See comment re: validate_qt4.
287282
if s is None:
283+
# return a reasonable default for deprecation period
288284
return 'PyQt5'
289-
if not testing.is_called_from_pytest():
290-
cbook.warn_deprecated(
291-
"2.2",
292-
"The backend.qt5 rcParam was deprecated in version 2.2. In order "
293-
"to force the use of a specific Qt5 binding, either import that "
294-
"binding first, or set the QT_API environment variable.")
285+
cbook.warn_deprecated(
286+
"2.2",
287+
"The backend.qt5 rcParam was deprecated in version 2.2. In order "
288+
"to force the use of a specific Qt5 binding, either import that "
289+
"binding first, or set the QT_API environment variable.")
295290
return ValidateInStrings("backend.qt5", ['PyQt5', 'PySide2'])(s)
296291

297292

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.