Skip to content

Commit ebaf3f7

Browse files
committed
Deprecate unused numba functionality
1 parent ac72fd6 commit ebaf3f7

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
@@ -118,6 +118,10 @@ def create_numba_signature(
118118
reduce_to_scalar: bool = False,
119119
) -> numba.types.Type:
120120
"""Create a Numba type for the signature of an `Apply` node or `FunctionGraph`."""
121+
warnings.warn(
122+
"create_numba_signature is deprecated and will be removed in a future release",
123+
FutureWarning,
124+
)
121125
input_types = [
122126
get_numba_type(
123127
inp.type, force_scalar=force_scalar, reduce_to_scalar=reduce_to_scalar
@@ -145,6 +149,11 @@ def create_tuple_creator(f, n):
145149
146150
See https://github.com/numba/numba/issues/2771#issuecomment-414358902
147151
"""
152+
warnings.warn(
153+
"create_tuple_creator is deprecated and will be removed in a future release",
154+
FutureWarning,
155+
)
156+
148157
assert n > 0
149158

150159
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)