-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
pass deprecation warning thrown using PySide6 #25360
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
Conversation
Instantiating FigureCanvasQTAgg raises DeprecationWarning and stops the application. Catching it fixes it. Example used: https://matplotlib.org/stable/gallery/user_interfaces/embedding_in_qt_sgskip.html Python 3.10.5 Matplotlib 3.7.0 PySide 6.4.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers
or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
Do you understand why a deprecation warning would raise an error here? Warnings don't usually kill the process... |
I can not reproduce this failure, however it raising a warning as an exception is ... surprising but it would not be the most surprising thing pyside does. Can you sort out which pyside6 attribute / method is causing this? The docs failure is unrelated. |
A warning is just a exception that the interpreter catches, prints out and returns to the caller (by default.) Are you running with |
@kvnp can you clarify the need for this? |
Thanks! That's what I was doing. I'm integrating matplotlib into an existing project and didn't pay attention to the launch configuration. Removing it fixes it, but wouldn't it be meaningful to catch the warning, since setting that attribute is expected not to work? How does PyQt handle this? Is it throwing an AttributeError instead? |
Catch what warning? Setting what attribute? How does PyQt handle what? You still haven't provided any context and no-one else can reproduce. |
How much more context do you need? It's all in the comments as well as in the diff of this PR. I ran the example with I discovered that it's possible to ignore certain warnings, I'm going to stick with that. |
What is the deprecation that was triggering this? We should definitely fix the warning, but catching the deprecation error is not the right fix. |
PR Summary
Using matplotlib 3.7.0 with PySide 6.4.2 on Python 3.10.5 does not work. Instantiating FigureCanvasQTAgg raises DeprecationWarning and stops the application. Catching it fixes it.
I used the following example: https://matplotlib.org/stable/gallery/user_interfaces/embedding_in_qt_sgskip.html
PR Checklist
Documentation and Tests
pytest
passes)Release Notes
.. versionadded::
directive in the docstring and documented indoc/users/next_whats_new/
.. versionchanged::
directive in the docstring and documented indoc/api/next_api_changes/
next_whats_new/README.rst
ornext_api_changes/README.rst