X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fdbconn.py;h=72453f643d26dc35b768395d5d9886264d49b3eb;hb=4830d9be143c7645ea932b53fae095e275ad7814;hp=d66a64cfda64b036e9c847948227db5384f0bcf3;hpb=dc0b7730846c3aeb835d891db390e93a04ae3552;p=dak.git diff --git a/daklib/dbconn.py b/daklib/dbconn.py index d66a64cf..72453f64 100755 --- a/daklib/dbconn.py +++ b/daklib/dbconn.py @@ -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 '' % (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'),