8000 bpo-46996: IDLE: Drop workarounds for old Tk versions (GH-31962) · python/cpython@383a3be · GitHub
[go: up one dir, main page]

Skip to content

Commit 383a3be

Browse files
bpo-46996: IDLE: Drop workarounds for old Tk versions (GH-31962)
1 parent 92a6abf commit 383a3be

File tree

3 files changed

+1
-36
lines changed

3 files changed

+1
-36
lines changed

Lib/idlelib/configdialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1588,7 +1588,7 @@ def create_page_windows(self):
15881588
win_height_int: Entry > win_height
15891589
frame_cursor: Frame
15901590
indent_title: Label
1591-
indent_chooser: Spinbox (Combobox < 8.5.9) > indent_spaces
1591+
indent_chooser: Spinbox > indent_spaces
15921592
blink_on: Checkbutton > cursor_blink
15931593
frame_autocomplete: Frame
15941594
auto_wait_title: Label

Lib/idlelib/macosx.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,27 +68,6 @@ def isXQuartz():
6868
return _tk_type == "xquartz"
6969

7070

71-
def tkVersionWarning(root):
72-
"""
73-
Returns a string warning message if the Tk version in use appears to
74-
be one known to cause problems with IDLE.
75-
1. Apple Cocoa-based Tk 8.5.7 shipped with Mac OS X 10.6 is unusable.
76-
2. Apple Cocoa-based Tk 8.5.9 in OS X 10.7 and 10.8 is better but
77-
can still crash unexpectedly.
78-
"""
79-
80-
if isCocoaTk():
81-
patchlevel = root.tk.call('info', 'patchlevel')
82-
if patchlevel not in ('8.5.7', '8.5.9'):
83-
return False
84-
return ("WARNING: The version of Tcl/Tk ({0}) in use may"
85-
" be unstable.\n"
86-
"Visit https://www.python.org/download/mac/tcltk/"
87-
" for current information.".format(patchlevel))
88-
else:
89-
return False
90-
91-
9271
def readSystemPreferences():
9372
"""
9473
Fetch the macOS system preferences.

Lib/idlelib/pyshell.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,6 @@
2222
pass
2323

2424
from tkinter import messagebox
25-
if TkVersion < 8.5:
26-
root = Tk() # otherwise create root in main
27-
root.withdraw()
28-
from idlelib.run import fix_scaling
29-
fix_scaling(root)
30-
messagebox.showerror("Idle Cannot Start",
31-
"Idle requires tcl/tk 8.5+, not %s." % TkVersion,
32-
parent=root)
33-
raise SystemExit(1)
3425

3526
from code import InteractiveInterpreter
3627
import itertools
@@ -1690,11 +1681,6 @@ def main():
16901681
# the IDLE shell window; this is less intrusive than always
16911682
# opening a separate window.
16921683

1693-
# Warn if using a problematic OS X Tk version.
1694-
tkversionwarning = macosx.tkVersionWarning(root)
1695-
if tkversionwarning:
1696-
shell.show_warning(tkversionwarning)
1697-
16981684
# Warn if the "Prefer tabs when opening documents" system
16991685
# preference is set to "Always".
17001686
prefer_tabs_preference_warning = macosx.preferTabsPreferenceWarning()

0 commit comments

Comments
 (0)
0