[Python-checkins] cross port importlib-metadata PR GH-76 (GH-13903)

Miss Islington (bot) webhook-mailer at python.org
Fri Jun 7 17:44:13 EDT 2019


https://github.com/python/cpython/commit/3b5bac27c03d0a891ad3c5710e72e066e7f97f56
commit: 3b5bac27c03d0a891ad3c5710e72e066e7f97f56
branch: 3.8
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2019-06-07T14:44:03-07:00
summary:

cross port importlib-metadata PR GH-76 (GH-13903)


https://gitlab.com/python-devs/importlib_metadata/merge_requests/76
(cherry picked from commit 65e5860fcc8ffe66f3c325d5484112f3b6540e8c)

Co-authored-by: Anthony Sottile <asottile at umich.edu>

files:
M Lib/importlib/metadata/__init__.py
M Lib/test/test_importlib/data/example-21.12-py3-none-any.whl
M Lib/test/test_importlib/data/example-21.12-py3.6.egg
M Lib/test/test_importlib/test_zip.py

diff --git a/Lib/importlib/metadata/__init__.py b/Lib/importlib/metadata/__init__.py
index a1abdd64815b..944dbb5fdf7e 100644
--- a/Lib/importlib/metadata/__init__.py
+++ b/Lib/importlib/metadata/__init__.py
@@ -89,6 +89,8 @@ def _from_config(cls, config):
     @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 f92f7716e3e6..641ab07f7aad 100644
Binary files a/Lib/test/test_importlib/data/example-21.12-py3-none-any.whl and b/Lib/test/test_importlib/data/example-21.12-py3-none-any.whl 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 1d3f998f41b8..cdb298a19b09 100644
Binary files a/Lib/test/test_importlib/data/example-21.12-py3.6.egg and b/Lib/test/test_importlib/data/example-21.12-py3.6.egg differ
diff --git a/Lib/test/test_importlib/test_zip.py b/Lib/test/test_importlib/test_zip.py
index db39e190ea7a..bcf7cf3618d7 100644
--- a/Lib/test/test_importlib/test_zip.py
+++ b/Lib/test/test_importlib/test_zip.py
@@ -26,6 +26,8 @@ def test_zip_entry_points(self):
         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'))



More information about the Python-checkins mailing list