-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Added support for MacOSX backend for PyPy #12633
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
Added support for MacOSX backend for PyPy #12633
Conversation
I've tested on PyPy 6.0.0 (3.5.3), CPython 3.6.6 and macOS High Sierra 10.13.6 |
OK< that's interesting - not claiming to be a mac-app expert at all. The The reason for the check was weird interactions between the REPL and the GUI, as in #665. If I don't include your new line, then I still get those errors. If I do include your new line I can't reproduce the errors noted in #665. I'm not sure if there aren't other errors, but my quick testing indicates your change works. I'm not an expert on Mac GUIs and don't even use the macosx backend, so I'm happy to defer to others as to whether this suggested change is an issue or not. I just got involved to try and fix the backend choosing issues. If we could get rid of the framework/non-framwork issues it'd sure make our lives a lot easier. But I suggest the change go in ping @jenshnielsen who is the most recent active dev who seems to grok this stuff. |
I can't reproduce loosing plot window focus (#665) on CPython 3.6 and PyPy 6.0.0 with this PR. |
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.
This change nullifies the point of verify_framework
(it always returns true!) so that function should be removed, and this change should be put into lazy_init
.
Seems like we need to leave |
Fair enough, but maybe only invoke verify_framework in that case... The point being that we don't have to start the event loop as early if we don't do this until |
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.
Works great for me on my conda python and pythonw. Seem to have proper control of GUI elements etc. I think we should go w/ this change...
Make sense... Done. |
This is kind of a game-changer if we don't have to steer OS X users to the framework build all the time. Thanks a lot, I dont' really understand what the Activation Policy flags mean, so justr assumed it was the way it was because. It would be good if someone who knows how to embed Matplotlib in a Mac GUI would write a small test GUI and make sure this doesn't break it somehow. |
It just tells OS how to display the App. From stackoverflow: If you want you can try I'm not an Apple developer in any sense (it actually was the first time I have to look at the Objective C code). But I'm really want to make the Matplotlib working with PyPy :) |
Tested on CPython 3.6.6 and PyPy 6.0.0 (3.5.3) both from MacPorts. Both work. |
@jenshnielsen, please approve |
@dopplershift or @dstansby : do either of you know of any bad interactions this might have? |
Tread very carefully here. I seem to remember once upon a time I was convinced things worked without a framework Python, but that hard check was added for a reason. One thing I do remember was that when I wasn't using a framework build, things like closing figure windows no longer work. |
I tested the bad behaviour I knew of
And those are both OK I’m not sure it’s the end of the world to change this. Worst case scenario folks start using the non-framework build and we get some bug reports and ask them to use the framework build. I don’t think we will actually break anyone’s code. OTOH if anyone remembers other bad interactions we should definitely check. |
Ping @mdehoon as you seem to have some expertise. |
This seems reasonable, but pushing to 3.1 (targeted for early next year). |
@tacaswell, @jklymak, @jenshnielsen |
No, it needs a second review (we do two reviews to merge)... |
Could you invite here those, that can make the second approvement? |
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.
Behavior both with and without a framework build of Python seem fine with this PR. The only difference I can see is the icon in the dock, otherwise they seem identical from a usage standpoint.
For the record, that was with Python 3.6.6 (conda-forge) and MacOS 10.14.1. |
This PR adds support for
MacOSX
backend for PyPy and fixes an issue with the buggy/inactive/background/hidden windows in non-framework Python setups.PR Checklist