@@ -267,31 +267,26 @@ def validate_backend(s):
267
267
268
268
269
269
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).
274
270
if s is None :
271
+ # return a reasonable default for deprecation period
275
272
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." )
282
278
return ValidateInStrings ("backend.qt4" , ['PyQt4' , 'PySide' , 'PyQt4v2' ])(s )
283
279
284
280
285
281
def validate_qt5 (s ):
286
- # See comment re: validate_qt4.
287
282
if s is None :
283
+ # return a reasonable default for deprecation period
288
284
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." )
295
290
return ValidateInStrings ("backend.qt5" , ['PyQt5' , 'PySide2' ])(s )
296
291
297
292
0 commit comments