We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57dafb4 commit ab28510Copy full SHA for ab28510
1 file changed
cuda_bindings/tests/utils/check_cyclical_import.py
@@ -18,7 +18,7 @@ def import_hook(name, globals=None, locals=None, fromlist=(), *args, **kwargs):
18
"""Approximate a custom import system that does not allow import cycles."""
19
20
stack_entry = (tuple(fromlist) if fromlist is not None else None, name)
21
- if stack_entry in import_stack:
+ if stack_entry in import_stack and name.startswith("cuda.bindings."):
22
raise ImportError(f"Import cycle detected: {stack_entry}, stack: {import_stack}")
23
import_stack.append(stack_entry)
24
res = orig_import(name, globals, locals, fromlist, *args, **kwargs)
0 commit comments