Skip to content

Commit 1c1805b

Browse files
committed
remove outdated deprecations from pytensor/tensor/rewriting/basic.py
1 parent 83e0c88 commit 1c1805b

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

pytensor/tensor/rewriting/basic.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1267,35 +1267,4 @@ def local_useless_topk(fgraph, node):
12671267
return {old_output: new_output}
12681268

12691269

1270-
def import_ShapeFeature():
1271-
from pytensor.tensor.rewriting.shape import ShapeFeature
1272-
1273-
return ShapeFeature
1274-
1275-
1276-
DEPRECATED_NAMES = {
1277-
"ShapeFeature": (
1278-
"`ShapeFeature` is now located in `pytensor.tensor.rewriting.shape`.",
1279-
import_ShapeFeature,
1280-
),
1281-
}
1282-
1283-
1284-
def __getattr__(name):
1285-
"""Intercept module-level attribute access of deprecated symbols.
1286-
1287-
Adapted from https://stackoverflow.com/a/55139609/3006474.
1288-
1289-
"""
1290-
from warnings import warn
1291-
1292-
res = DEPRECATED_NAMES.get(name)
1293-
if res:
1294-
msg, fn = res
1295-
warn(msg, DeprecationWarning, stacklevel=2)
1296-
return fn()
1297-
1298-
raise AttributeError(f"module {__name__} has no attribute {name}")
1299-
1300-
13011270
register_canonicalize(RemovalNodeRewriter(tensor_copy), name="remove_tensor_copy")

0 commit comments

Comments
 (0)