-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
gh-123155: On Darwin, fall back to X if DISPLAY is set #123156
Conversation
@ronaldoussoren Can you take a look? It seems better than the status quo to me. Also, note that running the test suite with |
What do you mean by this? "The requisite Mac GUI server" is the macOS UI. Do you only test on a headless Mac where you're logged in on using SSH? I'm -1 on falling back like this, any GUI tests on macOS should use the default UI system for that platform. Regardless of that, using X11 also requires a non-standard build of Tcl/Tk to actually use an X11 display server |
I only ever run on my M1 MacBook Pro. Tkinter tests have never worked for me because of this "no server" thing. I don't do framework builds because several other tests never pass. |
Does Tkinter work for you outside of tests? Apple's GUI frameworks assume they are invoked in code bundles into an .app bundle, which the framework arranges for. That said, I haven't verified this for years it may be that this is still needed, and on the other hand Tk might use one of the private APIs in Apple's libraries to enable running outside of a framework. |
Good question.
The question is: Where is the Apple-provided(?) Tcl/Tk supposed to live? I thought they were installed by default. I can't find a promising
|
Getting Tcl/Tk from Homebrew shouldn't matter, that should just be the same backend for Tk as we use in our installers and that doesn't support X11. But that doesn't answer my question. Does "python3 -m tkinter" show a GUI? (using the command to invoke your build of python). If that works, and likewise if our Tkinter and IDLE tests work with your patch, there's something wrong with the code that checks if a GUI can be used. Could you check if #118390 fixes the issue for you?
The system provided Tck/Tk live in That said, the system provided Tcl/Tk is not relevant because we don't support that ancient version of Tk due it being fairly buggy. |
Sorry, got carried away in a rabbit hole full of Indeed,
Yes it does. |
This PR allows the test suite to fall back to use X on MacOS is
DISPLAY
is set. Maybe a better fix would be to allow the user to specify which GUI interface to use, but this works well enough for me, and I never have the requisite Mac GUI server running anyway.