Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
FIX: re-jigger deprecation of rcParams using machinery in __init__#10379
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
Deprecation of qt binding rcparams | ||
`````````````````````````````````` | ||
The :rc:`backend.qt4` and :rc:`backend.qt5` rcParams were deprecated | ||
in version 2.2. In order to force the use of a specific Qt binding, | ||
either import that binding first, or set the ``QT_API`` environment | ||
variable. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -83,16 +83,16 @@ | ||
if QT_API is None: | ||
# No ETS environment or incompatible so use rcParams. | ||
if rcParams['backend'] == 'Qt5Agg': | ||
QT_API =QT_API_PYQT5 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. OK, but this does't just deprecate the rcparam, it now ignores it, right? Is that what you wanted? Feel free to clear if so, but putting a red x so its noted.. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Yes, but the rc deprecation tools do not have a gentler option | ||
elif rcParams['backend'] == 'Qt4Agg': | ||
QT_API =QT_API_PYQT | ||
else: | ||
# A non-Qt backend was specified, no version of the Qt | ||
# bindings is imported, but we still got here because a Qt | ||
# related file was imported. This is allowed, fall back to Qt5 | ||
# using which ever binding the rparams ask for. | ||
_fallback_to_qt4 = True | ||
QT_API =QT_API_PYQT5 | ||
# We will define an appropriate wrapper for the differing versions | ||
# of file dialog. | ||
@@ -142,7 +142,7 @@ | ||
except ImportError: | ||
if _fallback_to_qt4: | ||
# fell through, tried PyQt5, failed fall back to PyQt4 | ||
QT_API =QT_API_PYQT | ||
QT_RC_MAJOR_VERSION = 4 | ||
else: | ||
raise | ||