Skip to content

Commit c97c527

Browse files
committed
remove outdated deprecations from pytensor/graph/rewriting/db.py
1 parent f5edb20 commit c97c527

File tree

1 file changed

+0
-40
lines changed
  • pytensor/graph/rewriting

1 file changed

+0
-40
lines changed

pytensor/graph/rewriting/db.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -538,43 +538,3 @@ def __init__(self, db):
538538

539539
def query(self, *tags, **kwtags):
540540
return self.db.query(*tags, **kwtags)
541-
542-
543-
DEPRECATED_NAMES = [
544-
(
545-
"DB",
546-
"`DB` is deprecated; use `RewriteDatabase` instead.",
547-
RewriteDatabase,
548-
),
549-
(
550-
"Query",
551-
"`Query` is deprecated; use `RewriteDatabaseQuery` instead.",
552-
RewriteDatabaseQuery,
553-
),
554-
(
555-
"OptimizationDatabase",
556-
"`OptimizationDatabase` is deprecated; use `RewriteDatabase` instead.",
557-
RewriteDatabase,
558-
),
559-
(
560-
"OptimizationQuery",
561-
"`OptimizationQuery` is deprecated; use `RewriteDatabaseQuery` instead.",
562-
RewriteDatabaseQuery,
563-
),
564-
]
565-
566-
567-
def __getattr__(name):
568-
"""Intercept module-level attribute access of deprecated symbols.
569-
570-
Adapted from https://stackoverflow.com/a/55139609/3006474.
571-
572-
"""
573-
from warnings import warn
574-
575-
for old_name, msg, old_object in DEPRECATED_NAMES:
576-
if name == old_name:
577-
warn(msg, DeprecationWarning, stacklevel=2)
578-
return old_object
579-
580-
raise AttributeError(f"module {__name__} has no attribute {name}")

0 commit comments

Comments
 (0)