Context manager for the import lock.
| 1116 | # Import itself ############################################################### |
| 1117 | |
| 1118 | class _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 | |
| 1131 | def _resolve_name(name, package, level): |
no outgoing calls
no test coverage detected
searching dependent graphs…