Skip to content

Commit 2a297b8

Browse files
committed
Deprecate unused numba functionality
1 parent b0ff3ef commit 2a297b8

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
@@ -124,6 +124,10 @@ def create_numba_signature(
124124
reduce_to_scalar: bool = False,
125125
) -> numba.types.Type:
126126
"""Create a Numba type for the signature of an `Apply` node or `FunctionGraph`."""
127+
warnings.warn(
128+
"create_numba_signature is deprecated and will be removed in a future release",
129+
FutureWarning,
130+
)
127131
input_types = [
128132
get_numba_type(
129133
inp.type, force_scalar=force_scalar, reduce_to_scalar=reduce_to_scalar
@@ -151,6 +155,11 @@ def create_tuple_creator(f, n):
151155
152156
See https://github.com/numba/numba/issues/2771#issuecomment-414358902
153157
"""
158+
warnings.warn(
159+
"create_tuple_creator is deprecated and will be removed in a future release",
160+
FutureWarning,
161+
)
162+
154163
assert n > 0
155164

156165
f = numba_njit(f)

tests/link/numba/test_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,8 @@ def test_get_numba_type(v, expected, force_scalar, not_implemented):
314314
],
315315
)
316316
def test_create_numba_signature(v, expected, force_scalar):
317-
res = numba_basic.create_numba_signature(v, force_scalar=force_scalar)
317+
with pytest.warns(FutureWarning, match="deprecated"):
318+
res = numba_basic.create_numba_signature(v, force_scalar=force_scalar)
318319
assert res == expected
319320

320321

0 commit comments

Comments
 (0)