Skip to content

Commit

Permalink
Merge pull request #454 from python/bugfix/103661
Browse files Browse the repository at this point in the history
Fix path handling and masked errors on Windows for installed-files.txt
  • Loading branch information
jaraco authored Apr 22, 2023
2 parents 11b9ddf + be58651 commit af84998
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
v6.5.1
======

* python/cpython#103661: Removed excess error suppression in
``_read_files_egginfo_installed`` and fixed path handling
on Windows.

v6.5.0
======

Expand Down
15 changes: 9 additions & 6 deletions importlib_metadata/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,12 +536,15 @@ def _read_files_egginfo_installed(self):
subdir = getattr(self, '_path', None)
if not text or not subdir:
return
with contextlib.suppress(Exception):
ret = [
str((subdir / line).resolve().relative_to(self.locate_file('')))
for line in text.splitlines()
]
return map('"{}"'.format, ret)

ret = [
(subdir / line)
.resolve()
.relative_to(self.locate_file('').resolve())
.as_posix()
for line in text.splitlines()
]
return map('"{}"'.format, ret)

def _read_files_egginfo_sources(self):
"""
Expand Down

0 comments on commit af84998

Please sign in to comment.