MCPcopy Index your code
hub / github.com/RustPython/RustPython / _ImportLockContext

Class _ImportLockContext

Lib/importlib/_bootstrap.py:1221–1231  ·  view source on GitHub ↗

Context manager for the import lock.

Source from the content-addressed store, hash-verified

1219# Import itself ###############################################################
1220
1221class _ImportLockContext:
1222
1223 """Context manager for the import lock."""
1224
1225 def __enter__(self):
1226 """Acquire the import lock."""
1227 _imp.acquire_lock()
1228
1229 def __exit__(self, exc_type, exc_value, exc_traceback):
1230 """Release the import lock regardless of any raised exceptions."""
1231 _imp.release_lock()
1232
1233
1234def _resolve_name(name, package, level):

Callers 1

_find_specFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected