Skip to content
Prev Previous commit
Next Next commit
Revert a change removing the default adapter argument on SpecLoaderAd…
…apter.__init__()
  • Loading branch information
whitphx committed Sep 19, 2025
commit 7dc7e46185dc2386b5050f277a4944a94edcd6fd
2 changes: 1 addition & 1 deletion Lib/importlib/resources/_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SpecLoaderAdapter:
Adapt a package spec to adapt the underlying loader.
"""

def __init__(self, spec, adapter):
def __init__(self, spec, adapter=lambda spec: spec.loader):
self.spec = spec
self.loader = adapter(spec)

Expand Down
Loading