GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-97527: IDLE: protect macosx Tk() call when no GUI by terryjreedy · Pull Request #97530 · python/cpython

Conversation

@terryjreedy

@terryjreedy terryjreedy commented Sep 24, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui') does not raise. This function can be called as an unintended side-effect of calling other idlelib code as part of tests on macOS without a GUI enabled.

  • Issue: IDLE: protect macOS Tk() call when no GUI #97527

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@terryjreedy
pythongh-97527: IDLE: protect macosx Tk() call when no GUI
5417a3d
Only call tkinter.tk and its follow-up code in _init_tk_type
when requires('gui') does not raise.  This function can be
called as an unintended side-effect of calling other idlelib
code as part of tests on macOS without a GUI enabled.
@terryjreedy terryjreedy added needs backport to 3.9 needs backport to 3.11 only security fixes labels Sep 24, 2022
@terryjreedy terryjreedy self-assigned this Sep 24, 2022
@bedevere-bot bedevere-bot added the awaiting core review label Sep 24, 2022
@terryjreedy terryjreedy added the skip news label Sep 24, 2022
@terryjreedy terryjreedy mentioned this pull request Sep 24, 2022
GUI tests: CPython 3.9 CI failure for macOS: macOS 11 (1107) or later required, have instead 11 (1106) ! #97032
Closed
@terryjreedy terryjreedy removed the needs backport to 3.9 label Sep 24, 2022
ned-deily
ned-deily approved these changes Sep 24, 2022
View reviewed changes

@ned-deily ned-deily left a comment

Copy link
Copy Markdown
Member

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.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting core review labels Sep 24, 2022
@terryjreedy
terryjreedy merged commit 9704f8d into python:main Sep 24, 2022
@miss-islington

miss-islington commented Sep 24, 2022

Copy link
Copy Markdown
Contributor

Thanks @terryjreedy for the PR 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the awaiting merge label Sep 24, 2022
@bedevere-bot

bedevere-bot commented Sep 24, 2022

Copy link
Copy Markdown

GH-97531 is a backport of this pull request to the 3.11 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Sep 24, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 24, 2022
@terryjreedy @miss-islington
pythongh-97527: IDLE: protect macosx Tk() call when no GUI (pythonGH-…
e2154d9
…97530)

Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise.  This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
(cherry picked from commit 9704f8d)

Co-authored-by: Terry Jan Reedy <[email protected]>
@bedevere-bot

bedevere-bot commented Sep 24, 2022

Copy link
Copy Markdown

GH-97532 is a backport of this pull request to the 3.10 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 label Sep 24, 2022
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 24, 2022
@terryjreedy @miss-islington
pythongh-97527: IDLE: protect macosx Tk() call when no GUI (pythonGH-…
27e7229
…97530)

Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise.  This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
(cherry picked from commit 9704f8d)

Co-authored-by: Terry Jan Reedy <[email protected]>
@terryjreedy
terryjreedy deleted the tktype branch September 24, 2022 21:41
miss-islington added a commit that referenced this pull request Sep 24, 2022
@miss-islington @terryjreedy
gh-97527: IDLE: protect macosx Tk() call when no GUI (GH-97530)
a7a7da4
Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise.  This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
(cherry picked from commit 9704f8d)

Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington added a commit that referenced this pull request Sep 24, 2022
@miss-islington @terryjreedy
gh-97527: IDLE: protect macosx Tk() call when no GUI (GH-97530)
fe8db63
Only call tkinter.tk and its follow-up code in _init_tk_type when requires('gui')
does not raise.  This function can be called as an unintended side-effect of
calling other idlelib code as part of tests on macOS without a GUI enabled.
(cherry picked from commit 9704f8d)

Co-authored-by: Terry Jan Reedy <[email protected]>
@python python deleted a comment from bedevere-bot Sep 24, 2022
@terryjreedy terryjreedy mentioned this pull request Oct 15, 2022
IDLE: protect macOS Tk() call when no GUI #97527
Closed
terryjreedy added a commit to terryjreedy/cpython that referenced this pull request Oct 16, 2022
@terryjreedy
pythongh-97527: IDLE - fix buggy macosx patch
9ee8f5c
python#97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
@terryjreedy terryjreedy mentioned this pull request Oct 16, 2022
gh-97527: IDLE - fix buggy macosx patch #98313
Merged
terryjreedy added a commit that referenced this pull request Oct 16, 2022
@terryjreedy
gh-97527: IDLE - fix buggy macosx patch (#98313)
35fa5d5
#97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
@miss-islington miss-islington mentioned this pull request Oct 16, 2022
[3.11] gh-97527: IDLE - fix buggy macosx patch (GH-98313) #98329
Merged
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 16, 2022
@terryjreedy @miss-islington
pythongh-97527: IDLE - fix buggy macosx patch (pythonGH-98313)
d4a2d06
pythonGH-97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
(cherry picked from commit 35fa5d5)

Co-authored-by: Terry Jan Reedy <[email protected]>
@miss-islington miss-islington mentioned this pull request Oct 16, 2022
[3.10] gh-97527: IDLE - fix buggy macosx patch (GH-98313) #98330
Merged
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 16, 2022
@terryjreedy @miss-islington
pythongh-97527: IDLE - fix buggy macosx patch (pythonGH-98313)
36a6279
pythonGH-97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
(cherry picked from commit 35fa5d5)

Co-authored-by: Terry Jan Reedy <[email protected]>
@terryjreedy terryjreedy mentioned this pull request Oct 16, 2022
3.10.8 IDLE startup failure: No module named 'test' #98324
Closed
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 16, 2022
@terryjreedy @miss-islington
pythongh-97527: IDLE - fix buggy macosx patch (pythonGH-98313)
50ef214
pythonGH-97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
(cherry picked from commit 35fa5d5)

Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington added a commit that referenced this pull request Oct 16, 2022
@miss-islington @terryjreedy
gh-97527: IDLE - fix buggy macosx patch (GH-98313)
928b5f1
GH-97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
(cherry picked from commit 35fa5d5)

Co-authored-by: Terry Jan Reedy <[email protected]>
miss-islington added a commit that referenced this pull request Oct 16, 2022
@miss-islington @terryjreedy
gh-97527: IDLE - fix buggy macosx patch (GH-98313)
21fbf16
GH-97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
(cherry picked from commit 35fa5d5)

Co-authored-by: Terry Jan Reedy <[email protected]>
hroncok pushed a commit to fedora-python/cpython that referenced this pull request Nov 14, 2022
@miss-islington @terryjreedy @hroncok
00393: IDLE - fix buggy macosx patch
af87664
pythonGH-97530 fixed IDLE tests possibly crashing on a Mac without a GUI.
But it resulted in IDLE not starting in 3.10.8, 3.12.0a1, and
Microsoft Python 3.10.2288.0 when test/* is not installed.
After this patch, test.* is only imported when testing on Mac.
(cherry picked from commit 35fa5d5)

Co-authored-by: Terry Jan Reedy <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@ned-deily ned-deily ned-deily approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@terryjreedy terryjreedy

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@terryjreedy @miss-islington @bedevere-bot @ned-deily
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.