mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.
This commit is contained in:
parent
cf19cc3b92
commit
879986d8a9
13 changed files with 66 additions and 67 deletions
|
@ -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"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue