File tree Expand file tree Collapse file tree 1 file changed +0
-40
lines changed Expand file tree Collapse file tree 1 file changed +0
-40
lines changed Original file line number Diff line number Diff line change @@ -538,43 +538,3 @@ def __init__(self, db):
538
538
539
539
def query (self , * tags , ** kwtags ):
540
540
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 } " )
You can’t perform that action at this time.
0 commit comments