Skip to content

Commit fb40939

Browse files
committed
fix: stop re-exporting private _optional_cuda_import from __init__
The re-export shadowed the `_optional_cuda_import` submodule with the function of the same name, breaking `import ... as` in tests. Import directly from the submodule in consumers instead. Made-with: Cursor
1 parent 8e40a20 commit fb40939

File tree

3 files changed

+2
-3
lines changed

3 files changed

+2
-3
lines changed

cuda_core/cuda/core/_linker.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ from dataclasses import dataclass
2929
from typing import Union
3030
from warnings import warn
3131

32-
from cuda.pathfinder import _optional_cuda_import
32+
from cuda.pathfinder._optional_cuda_import import _optional_cuda_import
3333
from cuda.core._device import Device
3434
from cuda.core._module import ObjectCode
3535
from cuda.core._utils.clear_error_support import assert_type

cuda_core/cuda/core/_program.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import threading
1414
from warnings import warn
1515

1616
from cuda.bindings import driver, nvrtc
17-
from cuda.pathfinder import _optional_cuda_import
17+
from cuda.pathfinder._optional_cuda_import import _optional_cuda_import
1818

1919
from libcpp.vector cimport vector
2020

cuda_pathfinder/cuda/pathfinder/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
locate_nvidia_header_directory as locate_nvidia_header_directory,
2626
)
2727
from cuda.pathfinder._headers.supported_nvidia_headers import SUPPORTED_HEADERS_CTK as _SUPPORTED_HEADERS_CTK
28-
from cuda.pathfinder._optional_cuda_import import _optional_cuda_import as _optional_cuda_import
2928
from cuda.pathfinder._static_libs.find_bitcode_lib import (
3029
SUPPORTED_BITCODE_LIBS as _SUPPORTED_BITCODE_LIBS,
3130
)

0 commit comments

Comments
 (0)