[sqlalchemy] Re: Calling a function (Stored Procedure) returning a recordset

2007-05-13 Thread Sanjay
> Further findings and queries on SelectResults: > > 1. Is SelectResults still needed in certain situations: > > a. Observed that SelectResults was having a count() method. If we > don't use SelectResults, either we have to query the database for > getting the count manually, or use len(list). Usi

[sqlalchemy] Re: winpdb and sqlalchemy

2007-05-13 Thread sdobrev
There were some (proposed?) changes on the order/precedence of looking in paths by import - see PYTHONPATH, virtual-python, .eggs, xxx.path in site-packages/ and similar tweaks. u may eventualy have multiple installs of some package; and then original "import" may work very differently fro

[sqlalchemy] Re: winpdb and sqlalchemy

2007-05-13 Thread Eric Ongerth
Incidentally, the same problem is happening when using SPE as my editor. Ordinarily it is able to open sources of imported modules so the user can view the statement where an exception occurred, but in the case of SQLAlchemy modules, it's going after the egg instead of where the .py files actuall

[sqlalchemy] Re: Curious problem with SQLAlchemy

2007-05-13 Thread Michael Harrison
My oh my... I found the problem. Even though the stack trace indicated it was using cached objects, this must not have been the case. Once I recycled Apache, everything worked fine. Thanks for your feedback nevertheless, -Michael On May 13, 5:46 pm, Michael Bayer <[EMAIL PROTECTED]> wrote: > O

[sqlalchemy] Re: winpdb and sqlalchemy

2007-05-13 Thread Eric Ongerth
That makes sense. I could do that, or I could just put copies of all the needed files in the directory where winpdb's looking. I guess my question is, why isn't the relevant stuff already in my site-packages directory as a result of installing SQLAlchemy? I followed the usual install procedure

[sqlalchemy] Re: Curious problem with SQLAlchemy

2007-05-13 Thread Michael Bayer
On May 13, 2007, at 1:42 PM, Michael Harrison wrote: > > I'm trying to execute a simple query using SA. The following python > script *works*: > > dbsession = create_session() > results = dbsession.query(User).select_by(email='[EMAIL PROTECTED]') > for user in results: > print user.email >

[sqlalchemy] Curious problem with SQLAlchemy

2007-05-13 Thread Michael Harrison
I'm trying to execute a simple query using SA. The following python script *works*: dbsession = create_session() results = dbsession.query(User).select_by(email='[EMAIL PROTECTED]') for user in results: print user.email dbsession.close() However, I get an error when the following code execu

[sqlalchemy] Re: Session.__init__ , Session.close and exceptions

2007-05-13 Thread Manlio Perillo
Michael Bayer ha scritto: > Manlio Perillo wrote: >> Regards. >> >> I need to know if the __init__ and close methods of the Session object >> *never* raise an exception. > > nothing *never* raises an exception. > if you pass along bad arguments, Well, the two function are under "my control".

[sqlalchemy] Re: Getting hold of a mapper class from within another mapper class?

2007-05-13 Thread Andreas Jung
--On 12. Mai 2007 11:22:51 -0400 Michael Bayer <[EMAIL PROTECTED]> wrote: ok, you mean a "mapped" class, right ? i.e.the History class. i dont exactly understand why you cant just say "History", so heres the most generic way possible to go from 'self' to the class used on a relation: Ba

[sqlalchemy] Re: Session.__init__ , Session.close and exceptions

2007-05-13 Thread Michael Bayer
Manlio Perillo wrote: > > Regards. > > I need to know if the __init__ and close methods of the Session object > *never* raise an exception. nothing *never* raises an exception. if you pass along bad arguments, youll get an exception. theres no database operations or per-object assertions within

[sqlalchemy] Re: winpdb and sqlalchemy

2007-05-13 Thread Paul Johnston
Hi, Here something you could try. Delete the egg and get a SVN checkout of SQLAlchemy. Then copy the lib/sqlalchemy directory into your site-packages directory (as "sqlalchemy"; omit the "lib/"). This bypasses the egg mechanisms, which /may/ help. Paul Eric Ongerth wrote: >I'm using winpdb