mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Issue #9561: distutils now reads and writes egg-info files using UTF-8
instead of the locale encoding.
This commit is contained in:
parent
a404b49321
commit
a1bea6e10c
3 changed files with 8 additions and 8 deletions
|
@ -1010,11 +1010,9 @@ class DistributionMetadata:
|
|||
def write_pkg_info(self, base_dir):
|
||||
"""Write the PKG-INFO file into the release tree.
|
||||
"""
|
||||
pkg_info = open(os.path.join(base_dir, 'PKG-INFO'), 'w')
|
||||
try:
|
||||
with open(os.path.join(base_dir, 'PKG-INFO'), 'w',
|
||||
encoding='UTF-8') as pkg_info:
|
||||
self.write_pkg_file(pkg_info)
|
||||
finally:
|
||||
pkg_info.close()
|
||||
|
||||
def write_pkg_file(self, file):
|
||||
"""Write the PKG-INFO format data to a file object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue