Conversation
There was a problem hiding this comment.
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.
|
Well, I just learned something about the expected behavior of |
|
This suggests we should make a similar change in |
|
Thanks @philnagel! Congratulations on your first PR to Matplotlib 🎉 We hope to hear from you again. |
…597-on-v3.4.x Backport PR #19597 on branch v3.4.x (Fix IPython import issue)
When blocking import of
IPythonby definingsys.modules["IPython"] = None, creating plots fails becausebackend_bases.FigureCanvasBase._fix_ipython_backend2guiattempts to check ifIPythonis already imported by looking for an entry insys.modules. It then attempts to importIPython, which fails due to the import being blocked.Code sample to reproduce the issue:
which results in:
This PR addresses this issue by not only checking if
IPythonis present insys.modules, but also if it is blocked from being imported.