Skip to content

Commit af84998

Browse files
authored
Merge pull request #454 from python/bugfix/103661
Fix path handling and masked errors on Windows for installed-files.txt
2 parents 11b9ddf + be58651 commit af84998

File tree

2 files changed

+16
-6
lines changed

2 files changed

+16
-6
lines changed

CHANGES.rst

+7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
v6.5.1
2+
======
3+
4+
* python/cpython#103661: Removed excess error suppression in
5+
``_read_files_egginfo_installed`` and fixed path handling
6+
on Windows.
7+
18
v6.5.0
29
======
310

importlib_metadata/__init__.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -536,12 +536,15 @@ def _read_files_egginfo_installed(self):
536536
subdir = getattr(self, '_path', None)
537537
if not text or not subdir:
538538
return
539-
with contextlib.suppress(Exception):
540-
ret = [
541-
str((subdir / line).resolve().relative_to(self.locate_file('')))
542-
for line in text.splitlines()
543-
]
544-
return map('"{}"'.format, ret)
539+
540+
ret = [
541+
(subdir / line)
542+
.resolve()
543+
.relative_to(self.locate_file('').resolve())
544+
.as_posix()
545+
for line in text.splitlines()
546+
]
547+
return map('"{}"'.format, ret)
545548

546549
def _read_files_egginfo_sources(self):
547550
"""

0 commit comments

Comments
 (0)