diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2018-02-12 23:40:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-12 23:40:12 (GMT) |
commit | 9fad857444d90b9c6c36c31f5f07e57f390a70f2 (patch) | |
tree | 0470fe6c43284bff2bf7c54c62fe8b7b0ded5ba0 /Lib/idlelib/textview.py | |
parent | 46daf39453023767eef3b6876d4a34996e124397 (diff) | |
download | cpython-9fad857444d90b9c6c36c31f5f07e57f390a70f2.zip cpython-9fad857444d90b9c6c36c31f5f07e57f390a70f2.tar.gz cpython-9fad857444d90b9c6c36c31f5f07e57f390a70f2.tar.bz2 |
bpo-32837: IDLE - require encoding argument for textview.view_file. (GH-5646)
Using the system and place-dependent default encoding for open()
is a bad idea for IDLE's system and location-independent files.
(cherry picked from commit 688722cedd6437910ff185ecf94fb3b749ad37f2)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Diffstat (limited to 'Lib/idlelib/textview.py')
-rw-r--r-- | Lib/idlelib/textview.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/idlelib/textview.py b/Lib/idlelib/textview.py index e3b5506..6620134 100644 --- a/Lib/idlelib/textview.py +++ b/Lib/idlelib/textview.py @@ -107,7 +107,7 @@ def view_text(parent, title, text, modal=True, _utest=False): return ViewWindow(parent, title, text, modal, _utest=_utest) -def view_file(parent, title, filename, encoding=None, modal=True, _utest=False): +def view_file(parent, title, filename, encoding, modal=True, _utest=False): """Create text viewer for text in filename. Return error message if file cannot be read. Otherwise calls view_text |