Only print actually tested QT APIs when erroring#25772
Only print actually tested QT APIs when erroring#25772QuLogic merged 2 commits intomatplotlib:mainfrom
Conversation
kwsp
left a comment
There was a problem hiding this comment.
Looks good. This would definitely help future users narrow down the problem.
|
Can we add a test? I think this is testable using the sub-process trick and doing |
Do you mean |
The way Python importing works if you set the top level package to |
|
Added a test, put it in |
PR Summary
After I closed #25673 because the root cause of that issue is in IPython mapping "qt" to "qt5agg", I realized that perhaps we could still do better about our error message.
While this change would not have actually resolved the question of "what is asking this to be qt5??", it would have at least not also raised the question of "why is qt6 not working? It is installed."
Now only outputs the bindings which were actually tested, rather than all 4 regardless of whether only qt5 bindings were tested.
PR Checklist
Linked Issue
Documentation and Tests
pytestpasses)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.rstornext_api_changes/README.rst