cpython: 01d61096140a (original) (raw)

Mercurial > cpython

changeset 70205:01d61096140a

Issue #12112: packaging reads/writes metadata using UTF-8 [#12112]

Victor Stinner victor.stinner@haypocalc.com
date Thu, 19 May 2011 18:49:56 +0200
parents fe740c1cee02
children db9cb445c78f
files Lib/packaging/metadata.py Lib/packaging/tests/test_dist.py Lib/packaging/tests/test_metadata.py
diffstat 3 files changed, 9 insertions(+), 9 deletions(-)[+] [-] Lib/packaging/metadata.py 4 Lib/packaging/tests/test_dist.py 2 Lib/packaging/tests/test_metadata.py 12

line wrap: on

line diff

--- a/Lib/packaging/metadata.py +++ b/Lib/packaging/metadata.py @@ -307,7 +307,7 @@ class Metadata: def read(self, filepath): """Read the metadata values from a file path."""

def read_file(self, fileob): @@ -330,7 +330,7 @@ class Metadata: def write(self, filepath): """Write the metadata fields to filepath."""

def write_file(self, fileobject):

--- a/Lib/packaging/tests/test_dist.py +++ b/Lib/packaging/tests/test_dist.py @@ -78,7 +78,7 @@ class DistributionTestCase(support.Tempd # let's make sure the file can be written # with Unicode fields. they are encoded with # PKG_INFO_ENCODING

# regular ascii is of course always usable

--- a/Lib/packaging/tests/test_metadata.py +++ b/Lib/packaging/tests/test_metadata.py @@ -17,7 +17,7 @@ class MetadataTestCase(LoggingCatcher, def test_instantiation(self): PKG_INFO = os.path.join(os.path.dirname(file), 'PKG-INFO')

@@ -57,7 +57,7 @@ class MetadataTestCase(LoggingCatcher, def test_metadata_markers(self): # see if we can be platform-aware PKG_INFO = os.path.join(os.path.dirname(file), 'PKG-INFO')

@@ -77,7 +77,7 @@ class MetadataTestCase(LoggingCatcher, def test_description(self): PKG_INFO = os.path.join(os.path.dirname(file), 'PKG-INFO')

@@ -97,7 +97,7 @@ class MetadataTestCase(LoggingCatcher, def test_mapping_api(self): PKG_INFO = os.path.join(os.path.dirname(file), 'PKG-INFO')

@@ -130,14 +130,14 @@ class MetadataTestCase(LoggingCatcher, PKG_INFO = os.path.join(os.path.dirname(file), 'SETUPTOOLS-PKG-INFO')

PKG_INFO = os.path.join(os.path.dirname(file), 'SETUPTOOLS-PKG-INFO2')