Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a1bea6e1
Commit
a1bea6e1
authored
Sep 05, 2011
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #9561: distutils now reads and writes egg-info files using UTF-8
instead of the locale encoding.
parent
a404b493
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
Lib/distutils/command/install_egg_info.py
Lib/distutils/command/install_egg_info.py
+2
-3
Lib/distutils/dist.py
Lib/distutils/dist.py
+2
-4
Misc/NEWS
Misc/NEWS
+4
-1
No files found.
Lib/distutils/command/install_egg_info.py
View file @
a1bea6e1
...
@@ -40,9 +40,8 @@ class install_egg_info(Command):
...
@@ -40,9 +40,8 @@ class install_egg_info(Command):
"Creating "
+
self
.
install_dir
)
"Creating "
+
self
.
install_dir
)
log
.
info
(
"Writing %s"
,
target
)
log
.
info
(
"Writing %s"
,
target
)
if
not
self
.
dry_run
:
if
not
self
.
dry_run
:
f
=
open
(
target
,
'w'
)
with
open
(
target
,
'w'
,
encoding
=
'UTF-8'
)
as
f
:
self
.
distribution
.
metadata
.
write_pkg_file
(
f
)
self
.
distribution
.
metadata
.
write_pkg_file
(
f
)
f
.
close
()
def
get_outputs
(
self
):
def
get_outputs
(
self
):
return
self
.
outputs
return
self
.
outputs
...
...
Lib/distutils/dist.py
View file @
a1bea6e1
...
@@ -1010,11 +1010,9 @@ class DistributionMetadata:
...
@@ -1010,11 +1010,9 @@ class DistributionMetadata:
def
write_pkg_info
(
self
,
base_dir
):
def
write_pkg_info
(
self
,
base_dir
):
"""Write the PKG-INFO file into the release tree.
"""Write the PKG-INFO file into the release tree.
"""
"""
pkg_info
=
open
(
os
.
path
.
join
(
base_dir
,
'PKG-INFO'
),
'w'
)
with
open
(
os
.
path
.
join
(
base_dir
,
'PKG-INFO'
),
'w'
,
try
:
encoding
=
'UTF-8'
)
as
pkg_info
:
self
.
write_pkg_file
(
pkg_info
)
self
.
write_pkg_file
(
pkg_info
)
finally
:
pkg_info
.
close
()
def
write_pkg_file
(
self
,
file
):
def
write_pkg_file
(
self
,
file
):
"""Write the PKG-INFO format data to a file object.
"""Write the PKG-INFO format data to a file object.
...
...
Misc/NEWS
View file @
a1bea6e1
...
@@ -25,6 +25,9 @@ Core and Builtins
...
@@ -25,6 +25,9 @@ Core and Builtins
Library
Library
-------
-------
- Issue #9561: distutils now reads and writes egg-info files using UTF-8,
instead of the locale encoding.
- Issue #12888: Fix a bug in HTMLParser.unescape that prevented it to escape
- Issue #12888: Fix a bug in HTMLParser.unescape that prevented it to escape
more than 128 entities. Patch by Peter Otten.
more than 128 entities. Patch by Peter Otten.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment