Skip to content

Commit 99e310b

Browse files
committed
remove deprecated pytensoor.change_flags
1 parent fdcb21c commit 99e310b

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

pytensor/__init__.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -171,27 +171,3 @@ def get_scalar_constant_value(v):
171171
# imports were executed, we can warn about remaining flags provided by the user
172172
# through PYTENSOR_FLAGS.
173173
config.warn_unused_flags()
174-
175-
DEPRECATED_NAMES = [
176-
(
177-
"change_flags",
178-
"`pytensor.change_flags` is deprecated: use `pytensor.config.change_flags` instead.",
179-
config.change_flags,
180-
),
181-
]
182-
183-
184-
def __getattr__(name):
185-
"""Intercept module-level attribute access of deprecated symbols.
186-
187-
Adapted from https://stackoverflow.com/a/55139609/3006474.
188-
189-
"""
190-
from warnings import warn
191-
192-
for old_name, msg, old_object in DEPRECATED_NAMES:
193-
if name == old_name:
194-
warn(msg, DeprecationWarning, stacklevel=2)
195-
return old_object
196-
197-
raise AttributeError(f"module {__name__} has no attribute {name}")

0 commit comments

Comments
 (0)