From 5d60dbd1829d6224b2bbdb1903b97be5cc38cf35 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Nov 2021 19:52:26 -0500 Subject: [PATCH 1/2] Restore fallback when FastPath.root is empty. Fixes #353. --- importlib_metadata/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/importlib_metadata/__init__.py b/importlib_metadata/__init__.py index e296a2c7..2fd2cc5e 100644 --- a/importlib_metadata/__init__.py +++ b/importlib_metadata/__init__.py @@ -447,7 +447,7 @@ def joinpath(self, child): def children(self): with suppress(Exception): - return os.listdir(self.root or '') + return os.listdir(self.root or '.') with suppress(Exception): return self.zip_children() return [] From 046bf480a23c2719ba48d0f7169fb834c5100e05 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Mon, 8 Nov 2021 19:56:51 -0500 Subject: [PATCH 2/2] Update changelog. Ref #353. --- docs/changelog.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 532ec971..81c9d8a8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -2,6 +2,11 @@ importlib_metadata NEWS ========================= +v2.1.2 +====== + +* #353: Fixed discovery of distributions when path is empty. + v2.1.1 ======