Skip to content

Commit 1aa8c8b

Browse files
committed
Deprecate unused numba functionality
1 parent 599089e commit 1aa8c8b

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
@@ -112,6 +112,10 @@ def create_numba_signature(
112112
reduce_to_scalar: bool = False,
113113
) -> numba.types.Type:
114114
"""Create a Numba type for the signature of an `Apply` node or `FunctionGraph`."""
115+
warnings.warn(
116+
"create_numba_signature is deprecated and will be removed in a future release",
117+
FutureWarning,
118+
)
115119
input_types = [
116120
get_numba_type(
117121
inp.type, force_scalar=force_scalar, reduce_to_scalar=reduce_to_scalar
@@ -139,6 +143,11 @@ def create_tuple_creator(f, n):
139143
140144
See https://github.com/numba/numba/issues/2771#issuecomment-414358902
141145
"""
146+
warnings.warn(
147+
"create_tuple_creator is deprecated and will be removed in a future release",
148+
FutureWarning,
149+
)
150+
142151
assert n > 0
143152

144153
f = numba_njit(f)

tests/link/numba/test_basic.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,8 @@ def test_get_numba_type(v, expected, force_scalar, not_implemented):
317317
],
318318
)
319319
def test_create_numba_signature(v, expected, force_scalar):
320-
res = numba_basic.create_numba_signature(v, force_scalar=force_scalar)
320+
with pytest.warns(FutureWarning, match="deprecated"):
321+
res = numba_basic.create_numba_signature(v, force_scalar=force_scalar)
321322
assert res == expected
322323

323324

0 commit comments

Comments
 (0)