mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #24225: Within idlelib files, update idlelib module names.
This follows the previous patch that changed idlelib file names. Class names that matched old module names are not changed. Change idlelib imports in turtledemo.__main__. Exception: config-extensions.def. Previously, extension section names, file names, and class names had to match. Changing section names would create cross-version conflicts in config-extensions.cfg (user customizations). Instead map old names to new file names at point of import in editor.EditorWindow.load_extension. Patch extensively tested with test_idle, idle_test.htest.py, a custom import-all test, running IDLE in a console to catch messages, and testing each menu item. Based on a patch by Al Sweigart.
This commit is contained in:
parent
0d9220e162
commit
6fa5bdc6e8
73 changed files with 378 additions and 360 deletions
|
@ -1,9 +1,9 @@
|
|||
import os
|
||||
import bdb
|
||||
from tkinter import *
|
||||
from idlelib.WindowList import ListedToplevel
|
||||
from idlelib.ScrolledList import ScrolledList
|
||||
from idlelib import macosxSupport
|
||||
from idlelib.windows import ListedToplevel
|
||||
from idlelib.scrolledlist import ScrolledList
|
||||
from idlelib import macosx
|
||||
|
||||
|
||||
class Idb(bdb.Bdb):
|
||||
|
@ -34,8 +34,10 @@ class Idb(bdb.Bdb):
|
|||
return True
|
||||
else:
|
||||
prev_frame = frame.f_back
|
||||
if prev_frame.f_code.co_filename.count('Debugger.py'):
|
||||
# (that test will catch both Debugger.py and RemoteDebugger.py)
|
||||
prev_name = prev_frame.f_code.co_filename
|
||||
if 'idlelib' in prev_name and 'debugger' in prev_name:
|
||||
# catch both idlelib/debugger.py and idlelib/debugger_r.py
|
||||
# on both posix and windows
|
||||
return False
|
||||
return self.in_rpc_code(prev_frame)
|
||||
|
||||
|
@ -370,7 +372,7 @@ class Debugger:
|
|||
class StackViewer(ScrolledList):
|
||||
|
||||
def __init__(self, master, flist, gui):
|
||||
if macosxSupport.isAquaTk():
|
||||
if macosx.isAquaTk():
|
||||
# At least on with the stock AquaTk version on OSX 10.4 you'll
|
||||
# get a shaking GUI that eventually kills IDLE if the width
|
||||
# argument is specified.
|
||||
|
@ -502,7 +504,7 @@ class NamespaceViewer:
|
|||
#
|
||||
# There is also an obscure bug in sorted(dict) where the
|
||||
# interpreter gets into a loop requesting non-existing dict[0],
|
||||
# dict[1], dict[2], etc from the RemoteDebugger.DictProxy.
|
||||
# dict[1], dict[2], etc from the debugger_r.DictProxy.
|
||||
###
|
||||
keys_list = dict.keys()
|
||||
names = sorted(keys_list)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue