Skip to content

Commit

Permalink
cross port importlib-metadata PR python#76 (python#13903)
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile authored and DinoV committed Jan 14, 2020
1 parent 900f661 commit f54c885
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Lib/importlib/metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Binary file modified Lib/test/test_importlib/data/example-21.12-py3-none-any.whl
Binary file not shown.
Binary file modified Lib/test/test_importlib/data/example-21.12-py3.6.egg
Binary file not shown.
2 changes: 2 additions & 0 deletions Lib/test/test_importlib/test_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down

0 comments on commit f54c885

Please sign in to comment.