]> git.decadent.org.uk Git - dak.git/blobdiff - daklib/dbconn.py
Suppress warnings in the most suitable files.
[dak.git] / daklib / dbconn.py
index d66a64cfda64b036e9c847948227db5384f0bcf3..72453f643d26dc35b768395d5d9886264d49b3eb 100755 (executable)
@@ -59,6 +59,16 @@ from config import Config
 from textutils import fix_maintainer
 from dak_exceptions import NoSourceFieldError
 
+# suppress some deprecation warnings in squeeze related to sqlalchemy
+import warnings
+warnings.filterwarnings('ignore', \
+    "The SQLAlchemy PostgreSQL dialect has been renamed from 'postgres' to 'postgresql'.*", \
+    SADeprecationWarning)
+# TODO: sqlalchemy needs some extra configuration to correctly reflect
+# the ind_deb_contents_* indexes - we ignore the warnings at the moment
+warnings.filterwarnings("ignore", 'Predicate of partial index', SAWarning)
+
+
 ################################################################################
 
 # Patch in support for the debversion field type so that it works during
@@ -2578,16 +2588,6 @@ __all__.append('get_suite')
 
 ################################################################################
 
-# TODO: remove SuiteArchitecture class
-class SuiteArchitecture(object):
-    def __init__(self, *args, **kwargs):
-        pass
-
-    def __repr__(self):
-        return '<SuiteArchitecture (%s, %s)>' % (self.suite_id, self.arch_id)
-
-__all__.append('SuiteArchitecture')
-
 # TODO: should be removed because the implementation is too trivial
 @session_wrapper
 def get_suite_architectures(suite, skipsrc=False, skipall=False, session=None):
@@ -3097,12 +3097,6 @@ class DBConn(object):
                                  policy_queue = relation(PolicyQueue),
                                  copy_queues = relation(BuildQueue, secondary=self.tbl_suite_build_queue_copy)))
 
-        mapper(SuiteArchitecture, self.tbl_suite_architectures,
-               properties = dict(suite_id = self.tbl_suite_architectures.c.suite,
-                                 suite = relation(Suite, backref='suitearchitectures'),
-                                 arch_id = self.tbl_suite_architectures.c.architecture,
-                                 architecture = relation(Architecture)))
-
         mapper(SuiteSrcFormat, self.tbl_suite_src_formats,
                properties = dict(suite_id = self.tbl_suite_src_formats.c.suite,
                                  suite = relation(Suite, backref='suitesrcformats'),