Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6fa5bdc

Browse files
committedMay 28, 2016
Issue python#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.
1 parent 0d9220e commit 6fa5bdc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+378
-360
lines changed
 

‎Lib/idlelib/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
44
Run IDLE as python -m idlelib
55
"""
6-
import idlelib.PyShell
7-
idlelib.PyShell.main()
6+
import idlelib.pyshell
7+
idlelib.pyshell.main()
88
# This file does not work for 2.7; See issue 24212.

‎Lib/idlelib/autocomplete.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""AutoComplete.py - An IDLE extension for automatically completing names.
1+
"""autocomplete.py - An IDLE extension for automatically completing names.
22
33
This extension can complete either attribute names of file names. It can pop
44
a window with all available names, for the user to select from.
@@ -7,16 +7,16 @@
77
import sys
88
import string
99

10-
from idlelib.configHandler import idleConf
10+
from idlelib.config import idleConf
1111

1212
# This string includes all chars that may be in an identifier
1313
ID_CHARS = string.ascii_letters + string.digits + "_"
1414

1515
# These constants represent the two different types of completions
1616
COMPLETE_ATTRIBUTES, COMPLETE_FILES = range(1, 2+1)
1717

18-
from idlelib import AutoCompleteWindow
19-
from idlelib.HyperParser import HyperParser
18+
from idlelib import autocomplete_w
19+
from idlelib.hyperparser import HyperParser
2020

2121
import __main__
2222

@@ -49,7 +49,7 @@ def __init__(self, editwin=None):
4949
self._delayed_completion_index = None
5050

5151
def _make_autocomplete_window(self):
52-
return AutoCompleteWindow.AutoCompleteWindow(self.text)
52+
return autocomplete_w.AutoCompleteWindow(self.text)
5353

5454
def _remove_autocomplete_window(self, event=None):
5555
if self.autocompletewindow:

0 commit comments

Comments
 (0)
Please sign in to comment.