Apparently they like breaking old interfaces (e.g. DynamicMetaData,
sqlalchemy.create_session, sqlalchemy.relation) when they add new ones.
Also letting other old interfaces (e.g. meta.connect) bitrot even
while still present.
svn path=/trunk/packages/sipb-xen-database/; revision=946
+sipb-xen-database (10.20) hardy; urgency=low
+
+ * port to sqlalchemy-0.4, which cuts out some newly deprecated
+ interfaces and allowed some still-present interfaces to bitrot
+
+ -- Greg Price <price@mit.edu> Mon, 29 Sep 2008 06:06:21 +0000
+
sipb-xen-database (10.19) unstable; urgency=low
* Generate config files for pg_hba.conf
from invirt.config import structs as config
from models import *
+import sqlalchemy
def connect(uri = config.db.uri):
""" Connect to a given database URI"""
- meta.connect(uri)
+ meta.bind = sqlalchemy.create_engine(uri)
from sqlalchemy import *
+from sqlalchemy.orm import create_session, relation
from sqlalchemy.ext.sessioncontext import SessionContext
from sqlalchemy.ext.assignmapper import assign_mapper
'or_',
]
-meta = DynamicMetaData()
+meta = ThreadLocalMetaData()
ctx = SessionContext(create_session)
machine_table = Table('machines', meta,