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

Class _ImportLockContext

Lib/importlib/_bootstrap.py:1118–1128  ·  view source on GitHub ↗

Context manager for the import lock.

Source from the content-addressed store, hash-verified

1116# Import itself ###############################################################
1117
1118class _ImportLockContext:
1119
1120 """Context manager for the import lock."""
1121
1122 def __enter__(self):
1123 """Acquire the import lock."""
1124 _imp.acquire_lock()
1125
1126 def __exit__(self, exc_type, exc_value, exc_traceback):
1127 """Release the import lock regardless of any raised exceptions."""
1128 _imp.release_lock()
1129
1130
1131def _resolve_name(name, package, level):

Callers 1

_find_specFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…