Skip to content

Commit 294f53a

Browse files
committed
remove deprecated pytensoor.change_flags
1 parent 2f95bc6 commit 294f53a

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

pytensor/__init__.py

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

0 commit comments

Comments
 (0)