diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-05 21:46:05 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2011-09-05 21:46:05 (GMT) |
commit | e01aa53ea61f67418ee14e11289c68992b0f38db (patch) | |
tree | 58fe448923bcf9eb12d28071c54ab68789d69365 /Lib/distutils/command | |
parent | f7fbb7f75b6b8e27c2efaa75d08024b3c5039e71 (diff) | |
parent | a1bea6e10c6177813aab34a0f05c3d531ec8fd66 (diff) | |
download | cpython-e01aa53ea61f67418ee14e11289c68992b0f38db.zip cpython-e01aa53ea61f67418ee14e11289c68992b0f38db.tar.gz cpython-e01aa53ea61f67418ee14e11289c68992b0f38db.tar.bz2 |
Merge 3.2: Issue #9561: distutils now reads and writes egg-info files using UTF-8
instead of the locale encoding.
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/install_egg_info.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/distutils/command/install_egg_info.py b/Lib/distutils/command/install_egg_info.py index c888031..c2a7d64 100644 --- a/Lib/distutils/command/install_egg_info.py +++ b/Lib/distutils/command/install_egg_info.py @@ -40,9 +40,8 @@ class install_egg_info(Command): "Creating "+self.install_dir) log.info("Writing %s", target) if not self.dry_run: - f = open(target, 'w') - self.distribution.metadata.write_pkg_file(f) - f.close() + with open(target, 'w', encoding='UTF-8') as f: + self.distribution.metadata.write_pkg_file(f) def get_outputs(self): return self.outputs |