-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix macosx verify later #12557
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
Fix macosx verify later #12557
Conversation
Note that moving the check later is kind of an API change. |
So, previously, the check triggered on
|
AFAICT this "won't work" for reasons explained in #12188 (comment). Not that I have a better solution though. |
Thanks for the detailed comment in I'll still argue that the proposed change here is "better", even if it doesn't give mac users the fallback as desired. Right now if we use the non-framework build on a Mac, and no backend is specified, and we don't call matplotlib.use, macosx will try to run with the macosx backend, and will fail when the figure manager is instantiated because Yes, it'd be slicker to fallback to Qt5 etc, but I think this proposed behaviour is better than popping up the [Slightly tangential: I'd still actually argue we shouldn't outright fail using the non-framework Mac build. Yes some interactivity is broken, but you can still make plots. I'd change the Error to a Warning.] |
The argument seems reasonable, and I honestly can't pretend I care enough about OSX subtleties to have a strong opinion against (or for) the changes here, as long as you understand the pros and cons I explained. |
... well I don't care about the subtleties of OSX pythons either, but I guess we can't break Matplotlib for our Mac users given that a pretty big fraction of the scientific community uses Macs. This isn't just conda - it affects the system Framework build and the macports build as well. |
I'm not saying that the fix is not important, just that I can't really judge the tradeoffs involved in either approach. |
@jklymak this needs a rebase.... |
Obsoleted by #12603 |
PR Summary
This moves the verification of the framework build out of
import _macosx
, allowing us tocall that more often, and into the creation of the figure manager...
Closes #12188
Update (19 Oct 2018)
Moved MacOSx framework check to
pyplot.py
so it errors at the same place as before rather than waiting for a draw.Note this doesn't fix the bouncing icon in the framework build if one indeed wants to use the
macosx
backend, but it doesn't pop one up everytime regardless of the backend.Not sure what changed in 3.0 to cause the icon to start bouncing, but this should cure the problem for 75% of the users who just want to use Matplotlib with a different backend, like a notebook...Icon bouncing is because we initialize the window manager connection to python, but we don't open a window, so the app is in an in-between state of readiness.
Until conda ships a python that we can test if its a FRAMEWORK app, I am not sure we will fix this any better than this. Note the vast improvement here is that the bouncing doesn't happen for every backend like it does in 3.0.0
Non-framework python
this PR
yields: No icon popped up and
V 2.2.3
As above, though the stacktrace is deeper:
V3.0.0
Error is on import as above.
Framework python
V3.0.0
Icon pops up, bounces, and terminal loses focus.
Icon pops up, bounces, and terminal loses focus.
this PR
Icon bounces until a draw is called
and terminal loses focusbut focus returns to terminal.No icon pops up....
V2.2.3
Icon pops up, but doesn't bounce.
PR Checklist