Title: IDLE: protect macOS Tk() call when no GUI · Issue #97527 · python/cpython · GitHub
Open Graph Title: IDLE: protect macOS Tk() call when no GUI · Issue #97527 · python/cpython
X Title: IDLE: protect macOS Tk() call when no GUI · Issue #97527 · python/cpython
Description: The no-gui (mock Text) test_squeezer.SqueezerTest.test_write_stdout indirectly calls squeezer.Squeezer.mywrite, which calls macosx.isAquaTk, which calls _init_tk_type, which calls tkinter.Tk to initialize macosx._tk_type. When a test is ...
Open Graph Description: The no-gui (mock Text) test_squeezer.SqueezerTest.test_write_stdout indirectly calls squeezer.Squeezer.mywrite, which calls macosx.isAquaTk, which calls _init_tk_type, which calls tkinter.Tk to ini...
X Description: The no-gui (mock Text) test_squeezer.SqueezerTest.test_write_stdout indirectly calls squeezer.Squeezer.mywrite, which calls macosx.isAquaTk, which calls _init_tk_type, which calls tkinter.Tk to ini...
Opengraph URL: https://github.com/python/cpython/issues/97527
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IDLE: protect macOS Tk() call when no GUI","articleBody":"The no-gui (mock Text) test_squeezer.SqueezerTest.test_write_stdout indirectly calls squeezer.Squeezer.mywrite, which calls macosx.isAquaTk, which calls _init_tk_type, which calls tkinter.Tk to initialize macosx._tk_type. When a test is run on macOS with no GUI, this crashes; see #97032 for an example.\r\n\r\ntest_squeezer later calls isAquaTk directly. Even if we fix test_squeezer, there are about 10 other isAquaTk calls in idlelib that someday might be triggered by more complete tests. I will try patching _init_tk_type in branch tktype to skip Tk() when it would crash.","author":{"url":"https://github.com/terryjreedy","@type":"Person","name":"terryjreedy"},"datePublished":"2022-09-24T18:42:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/97527/cpython/issues/97527"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b5b13aba-afa0-fada-f6c5-2b844a0e7e29 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 91D6:10CAF0:3F6641:54EF22:69697E28 |
| html-safe-nonce | be5bf90ae886333f58a84796204e7b0240ee3c0b42f5632b36963d0404c694d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MUQ2OjEwQ0FGMDozRjY2NDE6NTRFRjIyOjY5Njk3RTI4IiwidmlzaXRvcl9pZCI6IjQxMTc0ODEwNTk5MTEzMDI2OTYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1934989657d2b900a637070b23d340ec0fb0ff143b1ca315e20b9ae34e4d8b34 |
| hovercard-subject-tag | issue:1384776310 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/97527/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1f8dc704d83a5ca0e4a83b90075537fe1da9b7cc4e28f4f06c9882c283ae09d2/python/cpython/issues/97527 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1f8dc704d83a5ca0e4a83b90075537fe1da9b7cc4e28f4f06c9882c283ae09d2/python/cpython/issues/97527 |
| og:image:alt | The no-gui (mock Text) test_squeezer.SqueezerTest.test_write_stdout indirectly calls squeezer.Squeezer.mywrite, which calls macosx.isAquaTk, which calls _init_tk_type, which calls tkinter.Tk to ini... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | terryjreedy |
| hostname | github.com |
| expected-hostname | github.com |
| None | f33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 48f380098b30acbb700b04f1724481ca10d574fc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width