Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion importlib_resources/future/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def wrapper(*args, **kwargs):
# MultiplexedPath may fail on zip subdirectory
return
# Python 3.10+
if reader.__class__.__module__.startswith('importlib.resources.'):
mod_name = reader.__class__.__module__
if mod_name.startswith('importlib.') and mod_name.endswith('readers'):
return
# Python 3.8, 3.9
if isinstance(reader, _adapters.CompatibilityFiles) and (
Expand Down
5 changes: 5 additions & 0 deletions importlib_resources/tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ def test_read_text(self):
def test_traversable(self):
assert isinstance(resources.files(self.data), Traversable)

def test_joinpath_with_multiple_args(self):
files = resources.files(self.data)
binfile = files.joinpath('subdirectory', 'binary.file')
self.assertTrue(binfile.is_file())

def test_old_parameter(self):
"""
Files used to take a 'package' parameter. Make sure anyone
Expand Down
1 change: 1 addition & 0 deletions newsfragments/257.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Restored expectation that stdlib readers are suppressed on Python 3.10.