diff --git a/CHANGES.rst b/CHANGES.rst index bd9cd385..bed2dd99 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -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 ====== diff --git a/importlib_metadata/__init__.py b/importlib_metadata/__init__.py index e9ae0d19..410e7a76 100644 --- a/importlib_metadata/__init__.py +++ b/importlib_metadata/__init__.py @@ -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): """