From 6fa5bdc6e85ec48925bc0d856b134f59d01c300f Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Sat, 28 May 2016 13:22:31 -0400 Subject: 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. --- Lib/idlelib/codecontext.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Lib/idlelib/codecontext.py') diff --git a/Lib/idlelib/codecontext.py b/Lib/idlelib/codecontext.py index 7d25adaa4c..2a21a1f84a 100644 --- a/Lib/idlelib/codecontext.py +++ b/Lib/idlelib/codecontext.py @@ -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"} -- cgit v1.2.1