Issue #13933: IDLE auto-complete did not work with some imported

module, like hashlib.  (Patch by Roger Serwy)
This commit is contained in:
Ned Deily 2012-02-04 18:35:23 +01:00
parent 60be6f8e37
commit 61c9534363
2 changed files with 5 additions and 2 deletions

View File

@ -190,7 +190,7 @@ class AutoComplete:
bigl = eval("dir()", namespace) bigl = eval("dir()", namespace)
bigl.sort() bigl.sort()
if "__all__" in bigl: if "__all__" in bigl:
smalll = eval("__all__", namespace) smalll = list(eval("__all__", namespace))
smalll.sort() smalll.sort()
else: else:
smalll = [s for s in bigl if s[:1] != '_'] smalll = [s for s in bigl if s[:1] != '_']
@ -200,7 +200,7 @@ class AutoComplete:
bigl = dir(entity) bigl = dir(entity)
bigl.sort() bigl.sort()
if "__all__" in bigl: if "__all__" in bigl:
smalll = entity.__all__ smalll = list(entity.__all__)
smalll.sort() smalll.sort()
else: else:
smalll = [s for s in bigl if s[:1] != '_'] smalll = [s for s in bigl if s[:1] != '_']

View File

@ -90,6 +90,9 @@ Core and Builtins
Library Library
------- -------
- Issue #13933: IDLE auto-complete did not work with some imported
module, like hashlib. (Patch by Roger Serwy)
- Issue #13901: Prevent test_distutils failures on OS X with --enable-shared. - Issue #13901: Prevent test_distutils failures on OS X with --enable-shared.
- Issue #13676: Handle strings with embedded zeros correctly in sqlite3. - Issue #13676: Handle strings with embedded zeros correctly in sqlite3.