Skip to content

Commit 7a0e6c3

Browse files
committed
Deprecate unused numba functionality
1 parent 7988058 commit 7a0e6c3

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

pytensor/link/numba/dispatch/basic.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,10 @@ def create_numba_signature(
111111
reduce_to_scalar: bool = False,
112112
) -> numba.types.Type:
113113
"""Create a Numba type for the signature of an `Apply` node or `FunctionGraph`."""
114+
warnings.warn(
115+
"create_numba_signature is deprecated and will be removed in a future release",
116+
FutureWarning,
117+
)
114118
input_types = [
115119
get_numba_type(
116120
inp.type, force_scalar=force_scalar, reduce_to_scalar=reduce_to_scalar
@@ -138,6 +142,11 @@ def create_tuple_creator(f, n):
138142
139143
See https://github.com/numba/numba/issues/2771#issuecomment-414358902
140144
"""
145+
warnings.warn(
146+
"create_tuple_creator is deprecated and will be removed in a future release",
147+
FutureWarning,
148+
)
149+
141150
assert n > 0
142151

143152
f = numba_njit(f)

tests/link/numba/test_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,8 @@ def test_get_numba_type(v, expected, force_scalar, not_implemented):
319319
],
320320
)
321321
def test_create_numba_signature(v, expected, force_scalar):
322-
res = numba_basic.create_numba_signature(v, force_scalar=force_scalar)
322+
with pytest.warns(FutureWarning, match="deprecated"):
323+
res = numba_basic.create_numba_signature(v, force_scalar=force_scalar)
323324
assert res == expected
324325

325326

0 commit comments

Comments
 (0)