Skip to content

Commit fc93ece

Browse files
committed
Add comments to remind about utf-8 in easy-install
1 parent 76ac799 commit fc93ece

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

setuptools/command/easy_install.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ def write_script(self, script_name, contents, mode="t", blockers=()):
873873
ensure_directory(target)
874874
if os.path.exists(target):
875875
os.unlink(target)
876-
with open(target, "w" + mode) as f: # TODO: is it safe to use "utf-8"?
876+
with open(target, "w" + mode) as f: # TODO: is it safe to use utf-8?
877877
f.write(contents)
878878
chmod(target, 0o777 - mask)
879879

@@ -1017,7 +1017,7 @@ def install_exe(self, dist_filename, tmpdir):
10171017

10181018
# Write EGG-INFO/PKG-INFO
10191019
if not os.path.exists(pkg_inf):
1020-
f = open(pkg_inf, 'w') # TODO: probably it is safe to use "utf-8"
1020+
f = open(pkg_inf, 'w') # TODO: probably it is safe to use utf-8
10211021
f.write('Metadata-Version: 1.0\n')
10221022
for k, v in cfg.items('metadata'):
10231023
if k != 'target_version':
@@ -1088,7 +1088,7 @@ def process(src, dst):
10881088
if locals()[name]:
10891089
txt = os.path.join(egg_tmp, 'EGG-INFO', name + '.txt')
10901090
if not os.path.exists(txt):
1091-
f = open(txt, 'w')
1091+
f = open(txt, 'w') # TODO: probably it is safe to use utf-8
10921092
f.write('\n'.join(locals()[name]) + '\n')
10931093
f.close()
10941094

0 commit comments

Comments
 (0)