-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
FIX: macosx framework check #11850
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 framework check #11850
Conversation
Attn @jenshnielsen... |
Happy with the change, but I'm not claiming any expertise on the topic. |
059b9bb
to
1086de7
Compare
OK, figured out how to pass the failure up the line. Now |
... and doesnt' depend on the deprecated calls... |
The problem is that for backend fallback to correctly work, we need importing the backend to fail with ImportError; backend fallback (at least as it is written right now) doesn't work with later failures. |
OK - see my comment on gitter - it turns out that not having the Framework installed ( |
Well, you have to ask those who put in the check to start with (#1613 and other PRs). |
Ah, OK, the issue is #665; if you open the save dialog you can't get typing focus in the dialog box. I'm 50/50 still if that requires us to error or warn, but it can be said to be not fully functional. |
@jklymak Afaik we put this in because we got so many errors and spent so much time tracking down why the gui was not working. With pyqt5 and wxpython being pip installable now it seems easier for users to switch to a functioning backend rather than using a semi broken one so I am mildly in favor of erroring out but warnings are fine with me too. |
OK, let's try something else. |
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.
As in comments: raising ImportError should occur when importing the module, not when trying to construct the objects.
1086de7
to
db64c09
Compare
Nope, that doesn't work. Newest push just uses the deprecated methods at import. |
Merging this as it un-breaks osx for now (and pushing the reckoning of using deprecated APIs to future us). The OSX backend is now agg based like the others (rather than an alternate rendering path) and presumably should also be made to play nice with cairo. The biggest advantage of the OSX backend over tk/wx is that it support hi-dpi. The biggest advantage over Qt is that it is no extra dependencies (on macs). |
…850-on-v3.0.x Backport PR #11850 on branch v3.0.x
PR Summary
Closes #11846
In the macosx backend,
verify_framework
now (post #11600) gets called before the app gets started, so the checks for the framework always fail. This PR,at the suggestion of @anntzer simply uses the old pre 10.6 checks. Not sure this is the correct solution versus movingverify_framework
to a point after the app has started, but it does work on my machine (10.13.6); using framework python (pythonw
) works, using non-framework python (python
) gives the appropriate error.This PR moves the
verify_framework
check intolazy_init
, where the app is started, and passes success or failure up a level.PR Checklist