mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +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,11 +1,11 @@
|
|||
"""CodeContext - Extension to display the block context above the edit window
|
||||
"""codecontext - Extension to display the block context above the edit window
|
||||
|
||||
Once code has scrolled off the top of a window, it can be difficult to
|
||||
determine which block you are in. This extension implements a pane at the top
|
||||
of each IDLE edit window which provides block structure hints. These hints are
|
||||
the lines which contain the block opening keywords, e.g. 'if', for the
|
||||
enclosing block. The number of hint lines is determined by the numlines
|
||||
variable in the CodeContext section of config-extensions.def. Lines which do
|
||||
variable in the codecontext section of config-extensions.def. Lines which do
|
||||
not open blocks are not shown in the context hints pane.
|
||||
|
||||
"""
|
||||
|
@ -13,7 +13,7 @@ import tkinter
|
|||
from tkinter.constants import TOP, LEFT, X, W, SUNKEN
|
||||
import re
|
||||
from sys import maxsize as INFINITY
|
||||
from idlelib.configHandler import idleConf
|
||||
from idlelib.config import idleConf
|
||||
|
||||
BLOCKOPENERS = {"class", "def", "elif", "else", "except", "finally", "for",
|
||||
"if", "try", "while", "with"}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue