diff options
-rw-r--r-- | Lib/idlelib/textView.py | 6 | ||||
-rw-r--r-- | Misc/NEWS | 2 |
2 files changed, 3 insertions, 5 deletions
diff --git a/Lib/idlelib/textView.py b/Lib/idlelib/textView.py index 3f3c247..e5c551a 100644 --- a/Lib/idlelib/textView.py +++ b/Lib/idlelib/textView.py @@ -62,11 +62,7 @@ def view_text(parent, title, text): def view_file(parent, title, filename, encoding=None): try: - if encoding: - import codecs - textFile = codecs.open(filename, 'r') - else: - textFile = open(filename, 'r') + textFile = open(filename, 'r', encoding=encoding) except IOError: import tkinter.messagebox as tkMessageBox tkMessageBox.showerror(title='File Load Error', @@ -66,6 +66,8 @@ C-API Library ------- +- Issue #8203: Fix IDLE Credits dialog: view_file() uses its encoding argument. + - Issue #8720: fix regression caused by fix for #4050 by making getsourcefile smart enough to find source files in the linecache. |