summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2019-06-07 21:23:39 (GMT)
committerBarry Warsaw <barry@python.org>2019-06-07 21:23:38 (GMT)
commit65e5860fcc8ffe66f3c325d5484112f3b6540e8c (patch)
treef6ac1a596c84a7dd626d2cb5278d28bee832759c
parent03d5831a2d62c68654ec223168e574cd546efbf6 (diff)
downloadcpython-65e5860fcc8ffe66f3c325d5484112f3b6540e8c.zip
cpython-65e5860fcc8ffe66f3c325d5484112f3b6540e8c.tar.gz
cpython-65e5860fcc8ffe66f3c325d5484112f3b6540e8c.tar.bz2
cross port importlib-metadata PR #76 (#13903)
https://gitlab.com/python-devs/importlib_metadata/merge_requests/76
-rw-r--r--Lib/importlib/metadata/__init__.py2
-rw-r--r--Lib/test/test_importlib/data/example-21.12-py3-none-any.whlbin1453 -> 1455 bytes
-rw-r--r--Lib/test/test_importlib/data/example-21.12-py3.6.eggbin1492 -> 1497 bytes
-rw-r--r--Lib/test/test_importlib/test_zip.py2
4 files changed, 4 insertions, 0 deletions
diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py
index a1abdd6..944dbb5 100644
--- a/Lib/importlib/metadata/__init__.py
+++ b/Lib/importlib/metadata/__init__.py
@@ -89,6 +89,8 @@ class EntryPoint(collections.namedtuple('EntryPointBase', 'name value group')):
@classmethod
def _from_text(cls, text):
config = ConfigParser()
+ # case sensitive: https://stackoverflow.com/q/1611799/812183
+ config.optionxform = str
try:
config.read_string(text)
except AttributeError: # pragma: nocover
diff --git a/Lib/test/test_importlib/data/example-21.12-py3-none-any.whl b/Lib/test/test_importlib/data/example-21.12-py3-none-any.whl
index f92f771..641ab07 100644
--- a/Lib/test/test_importlib/data/example-21.12-py3-none-any.whl
+++ b/Lib/test/test_importlib/data/example-21.12-py3-none-any.whl
Binary files differ
diff --git a/Lib/test/test_importlib/data/example-21.12-py3.6.egg b/Lib/test/test_importlib/data/example-21.12-py3.6.egg
index 1d3f998..cdb298a 100644
--- a/Lib/test/test_importlib/data/example-21.12-py3.6.egg
+++ b/Lib/test/test_importlib/data/example-21.12-py3.6.egg
Binary files differ
diff --git a/Lib/test/test_importlib/test_zip.py b/Lib/test/test_importlib/test_zip.py
index db39e19..bcf7cf3 100644
--- a/Lib/test/test_importlib/test_zip.py
+++ b/Lib/test/test_importlib/test_zip.py
@@ -26,6 +26,8 @@ class TestZip(unittest.TestCase):
scripts = dict(entry_points()['console_scripts'])
entry_point = scripts['example']
self.assertEqual(entry_point.value, 'example:main')
+ entry_point = scripts['Example']
+ self.assertEqual(entry_point.value, 'example:main')
def test_missing_metadata(self):
self.assertIsNone(distribution('example').read_text('does not exist'))