summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/squeezer.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-01-25 11:51:49 (GMT)
committerGitHub <noreply@github.com>2021-01-25 11:51:49 (GMT)
commit7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1 (patch)
tree7261d03e8a5799b86c7b9b8508ac3670880cd2b5 /Lib/idlelib/squeezer.py
parent96bcf6f4d4bed1cdf97883eb43e872ff1a92013d (diff)
downloadcpython-7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1.zip
cpython-7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1.tar.gz
cpython-7370be30017f81d2f41f1b4b2abf31dd9a3f8fb1.tar.bz2
bpo-43013: Fix old tkinter module names in idlelib (GH-24326)
Lowercase 'tkColorChooser', 'tkFileDialog', 'tkSimpleDialog', and 'tkMessageBox' and remove 'tk'. Just lowercase 'tkFont' as 'font' is already used. Adjust import. (cherry picked from commit 879986d8a932c4524cb6ff822afc9537de16e28d) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib/squeezer.py')
-rw-r--r--Lib/idlelib/squeezer.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/squeezer.py b/Lib/idlelib/squeezer.py
index be1538a..3046d80 100644
--- a/Lib/idlelib/squeezer.py
+++ b/Lib/idlelib/squeezer.py
@@ -17,7 +17,7 @@ messages and their tracebacks.
import re
import tkinter as tk
-import tkinter.messagebox as tkMessageBox
+from tkinter import messagebox
from idlelib.config import idleConf
from idlelib.textview import view_text
@@ -147,7 +147,7 @@ class ExpandingButton(tk.Button):
if self.is_dangerous is None:
self.set_is_dangerous()
if self.is_dangerous:
- confirm = tkMessageBox.askokcancel(
+ confirm = messagebox.askokcancel(
title="Expand huge output?",
message="\n\n".join([
"The squeezed output is very long: %d lines, %d chars.",
@@ -155,7 +155,7 @@ class ExpandingButton(tk.Button):
"It is recommended to view or copy the output instead.",
"Really expand?"
]) % (self.numoflines, len(self.s)),
- default=tkMessageBox.CANCEL,
+ default=messagebox.CANCEL,
parent=self.text)
if not confirm:
return "break"