MCPcopy Index your code
hub / github.com/python/cpython / wrap_spec

Function wrap_spec

Lib/importlib/resources/_adapters.py:163–168  ·  view source on GitHub ↗

Construct a package spec with traversable compatibility on the spec/loader/reader.

(package)

Source from the content-addressed store, hash-verified

161
162
163def wrap_spec(package):
164 """
165 Construct a package spec with traversable compatibility
166 on the spec/loader/reader.
167 """
168 return SpecLoaderAdapter(package.__spec__, TraversableResourcesLoader)

Callers 2

test_wrap_specMethod · 0.90
from_packageFunction · 0.85

Calls 1

SpecLoaderAdapterClass · 0.85

Tested by 1

test_wrap_specMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…