AuthKit and SQLAlchemy 0.4

0 views
Skip to first unread message

ejs

unread,
Oct 20, 2007, 12:16:41 AM10/20/07
to AuthKit
I've been trying to get AuthKit 0.4 to work and having found the
examples started there. Unfortunately they rely on SQLAlchemy 0.3.x
and I'm working on 0.4. I've managed to get them fixed (mostly adding
'from sqlalchemy.orm import *' to the start), but now I'm hitting
problems with the library. At first I was got 'no global variable
relation', the same import fix as needed by the example worked on
this, and now I'm onto:

File '.../pylonsServer/pylonsserver/controllers/authtest.py', line 6
in <module>
users.group_create("pylons")
File '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/
site-packages/AuthKit-0.4.1dev_r132-py2.5.egg/authkit/users/
sqlalchemy_driver.py', line 178 in group_create
new_group.flush()
AttributeError: 'Group' object has no attribute 'flush'

I think this error is repeated at least through the x_create methods
but haven't looked deep enough to find a fix for it yet.

Any ideas.

ejs

ejs

unread,
Oct 20, 2007, 12:53:41 AM10/20/07
to AuthKit
Ok I've found and installed http://hst.doublesquare.com/layouts/sqlalchemy04_driver.py.
I can now run the example after some further modification.

Sorry for the interruption/thanks for the prompt fix.

ejs

ejs

unread,
Nov 2, 2007, 10:03:38 AM11/2/07
to AuthKit
There's a bug in SQLAlchemy04_driver.py . It never releases the
sessions it creates which will eventually crash the program, when I've
tested my fix I'll post it.

James Gardner

unread,
Nov 5, 2007, 7:47:46 PM11/5/07
to aut...@googlegroups.com
Hi ejs,

Yes, the session isn't being released properly in the code you
suggested. I've written a new driver for SQLAlchemy which uses the (as
yet unreleased) SQLAlchemyManager middleware here:

http://authkit.org/trac/

There is an example here:

http://authkit.org/trac/browser/AuthKit/trunk/examples/user/database/app.py

Cheers,

James

Reply all
Reply to author
Forward
0 new messages