Skip to content

Commit

Permalink
Add workaround for broken importlib.resources when an editable sentin…
Browse files Browse the repository at this point in the history
…el is present.

Closes #318
  • Loading branch information
jaraco committed Sep 12, 2024
1 parent d116be1 commit 8684c7a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions importlib_resources/future/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ def wrapper(*args, **kwargs):
except NotADirectoryError:
# MultiplexedPath may fail on zip subdirectory
return
except ValueError as exc:
# NamespaceReader in stdlib may fail for editable installs
# (python/importlib_resources#311, python/importlib_resources#318)
# Remove after bugfix applied to Python 3.13.
if "not enough values to unpack" not in str(exc):
raise
return
# Python 3.10+
mod_name = reader.__class__.__module__
if mod_name.startswith('importlib.') and mod_name.endswith('readers'):
Expand Down

0 comments on commit 8684c7a

Please sign in to comment.