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 — [3.11] gh-97527: IDLE - fix buggy macosx patch (GH-98313) by miss-islington · Pull Request #98329 · python/cpython

[3.11] gh-97527: IDLE - fix buggy macosx patch (GH-98313) #98329

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.

Sign up for GitHub

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

Merged
miss-islington merged 1 commit into python:3.11 from miss-islington:backport-35fa5d5-3.11
Oct 16, 2022

Uh oh!

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

Merged

[3.11] gh-97527: IDLE - fix buggy macosx patch (GH-98313) #98329

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1 commit
Select commit
50ef214
gh-97527: IDLE - fix buggy macosx patch (GH-98313)
terryjreedy Oct 16, 2022
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

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

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

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

Diff view
Diff view

There are no files selected for viewing

5 changes: 5 additions & 0 deletions 5 Lib/idlelib/NEWS.txt
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ Released on 2022-10-03
=========================


gh-97527: Fix a bug in the previous bugfix that caused IDLE to not
start when run with 3.10.8, 3.12.0a1, and at least Microsoft Python
3.10.2288.0 installed without the Lib/test package. 3.11.0 was never
affected.

gh-65802: Document handling of extensions in Save As dialogs.

gh-95191: Include prompts when saving Shell (interactive input/output).
Expand Down
42 changes: 26 additions & 16 deletions 42 Lib/idlelib/macosx.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from os.path import expanduser
import plistlib
from sys import platform # Used in _init_tk_type, changed by test.
from test.support import requires, ResourceDenied

import tkinter

Expand All @@ -16,27 +15,38 @@

def _init_tk_type():
""" Initialize _tk_type for isXyzTk functions.

This function is only called once, when _tk_type is still None.
"""
global _tk_type
if platform == 'darwin':
try:
requires('gui')
except ResourceDenied: # Possible when testing.
_tk_type = "cocoa" # Newest and most common.
else:
root = tkinter.Tk()
ws = root.tk.call('tk', 'windowingsystem')
if 'x11' in ws:
_tk_type = "xquartz"
elif 'aqua' not in ws:
_tk_type = "other"
elif 'AppKit' in root.tk.call('winfo', 'server', '.'):

# When running IDLE, GUI is present, test/* may not be.
# When running tests, test/* is present, GUI may not be.
# If not, guess most common. Does not matter for testing.
from idlelib.__init__ import testing
if testing:
from test.support import requires, ResourceDenied
try:
requires('gui')
except ResourceDenied:
_tk_type = "cocoa"
else:
_tk_type = "carbon"
root.destroy()
return

root = tkinter.Tk()
ws = root.tk.call('tk', 'windowingsystem')
if 'x11' in ws:
_tk_type = "xquartz"
elif 'aqua' not in ws:
_tk_type = "other"
elif 'AppKit' in root.tk.call('winfo', 'server', '.'):
_tk_type = "cocoa"
else:
_tk_type = "carbon"
root.destroy()
else:
_tk_type = "other"
return

def isAquaTk():
"""
Expand Down
3 changes: 3 additions & 0 deletions 3 Misc/NEWS.d/next/IDLE/2022-10-15-21-20-40.gh-issue-97527.otAHJM.rst
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix a bug in the previous bugfix that caused IDLE to not start when run with
3.10.8, 3.12.0a1, and at least Microsoft Python 3.10.2288.0 installed
without the Lib/test package. 3.11.0 was never affected.
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.