Changeset 946


Ignore:
Timestamp:
Sep 29, 2008, 2:21:34 AM (16 years ago)
Author:
price
Message:

port sipb-xen-database to sqlalchemy-0.4

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.

Location:
trunk/packages/sipb-xen-database
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-database/debian/changelog

    r918 r946  
     1sipb-xen-database (10.20) hardy; urgency=low
     2
     3  * port to sqlalchemy-0.4, which cuts out some newly deprecated
     4    interfaces and allowed some still-present interfaces to bitrot
     5
     6 -- Greg Price <price@mit.edu>  Mon, 29 Sep 2008 06:06:21 +0000
     7
    18sipb-xen-database (10.19) unstable; urgency=low
    29
  • trunk/packages/sipb-xen-database/python/database/__init__.py

    r829 r946  
    11from invirt.config import structs as config
    22from models import *
     3import sqlalchemy
    34
    45def connect(uri = config.db.uri):
    56    """ Connect to a given database URI"""
    6     meta.connect(uri)
     7    meta.bind = sqlalchemy.create_engine(uri)
  • trunk/packages/sipb-xen-database/python/database/models.py

    r874 r946  
    11from sqlalchemy import *
     2from sqlalchemy.orm import create_session, relation
    23
    34from sqlalchemy.ext.sessioncontext import SessionContext
     
    2425           ]
    2526
    26 meta = DynamicMetaData()
     27meta = ThreadLocalMetaData()
    2728ctx = SessionContext(create_session)
    2829
Note: See TracChangeset for help on using the changeset viewer.