Skip to content
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

QT4Agg deprecation #55

Closed
MBravoS opened this issue May 31, 2021 · 3 comments · Fixed by #80
Closed

QT4Agg deprecation #55

MBravoS opened this issue May 31, 2021 · 3 comments · Fixed by #80
Milestone

Comments

@MBravoS
Copy link

MBravoS commented May 31, 2021

Version 3.3 of matplotlib added a deprecation warning for QT4Agg, which seems planned to be deprecated in 3.5. If I'm understanding correctly how things work, that would mean from 3.5 that this call in gui.py:
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas4
will throw an error. Changing this:

from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas4
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas5

def FigureCanvas(fig):
    try:
        return FigureCanvas5(fig)
    except Exception:
        return FigureCanvas4(fig)

to this:

try:
    from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
except Exception: 
    from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas

should do the trick. I'm happy to make a pull request with that change if needed/desired.

@jkunimune
Copy link

It's worth noting that this does now throw an error. I guess viscm isn't actively supported anymore, but would it be possible to just pull #57, @tacaswell or @stefanv or whoever has the power?

@stefanv
Copy link
Contributor

stefanv commented Jul 15, 2022

viscm should be actively supported! Let us know of critical issues.

@tacaswell
Copy link
Member

@stefanv We need to cut a release with #57 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants