mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#10974: IDLE no longer crashes if its recent files list includes files
with non-ASCII characters in their path names. (with approval of release manager for 3.2rc2)
This commit is contained in:
parent
feac624827
commit
122539e287
2 changed files with 7 additions and 2 deletions
|
@ -772,7 +772,8 @@ class EditorWindow(object):
|
||||||
"Load and update the recent files list and menus"
|
"Load and update the recent files list and menus"
|
||||||
rf_list = []
|
rf_list = []
|
||||||
if os.path.exists(self.recent_files_path):
|
if os.path.exists(self.recent_files_path):
|
||||||
rf_list_file = open(self.recent_files_path,'r')
|
rf_list_file = open(self.recent_files_path,'r',
|
||||||
|
encoding='utf_8', errors='replace')
|
||||||
try:
|
try:
|
||||||
rf_list = rf_list_file.readlines()
|
rf_list = rf_list_file.readlines()
|
||||||
finally:
|
finally:
|
||||||
|
@ -790,7 +791,8 @@ class EditorWindow(object):
|
||||||
rf_list = [path for path in rf_list if path not in bad_paths]
|
rf_list = [path for path in rf_list if path not in bad_paths]
|
||||||
ulchars = "1234567890ABCDEFGHIJK"
|
ulchars = "1234567890ABCDEFGHIJK"
|
||||||
rf_list = rf_list[0:len(ulchars)]
|
rf_list = rf_list[0:len(ulchars)]
|
||||||
rf_file = open(self.recent_files_path, 'w')
|
rf_file = open(self.recent_files_path, 'w',
|
||||||
|
encoding='utf_8', errors='replace')
|
||||||
try:
|
try:
|
||||||
rf_file.writelines(rf_list)
|
rf_file.writelines(rf_list)
|
||||||
finally:
|
finally:
|
||||||
|
|
|
@ -16,6 +16,9 @@ Core and Builtins
|
||||||
Library
|
Library
|
||||||
-------
|
-------
|
||||||
|
|
||||||
|
- Issue #10974: IDLE no longer crashes if its recent files list includes files
|
||||||
|
with non-ASCII characters in their path names.
|
||||||
|
|
||||||
- Have hashlib.algorithms_available and hashlib.algorithms_guaranteed both
|
- Have hashlib.algorithms_available and hashlib.algorithms_guaranteed both
|
||||||
return sets instead of one returning a tuple and the other a frozenset.
|
return sets instead of one returning a tuple and the other a frozenset.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue