I'm using SqlAlchemy core to access my database. I'm just wondering if
there's a specific reason why the ResultProxy class doesn't implement the
__enter__ and __exit__ methods for automatically closing the results of a
query using Python's with statement. This would make the following code
Michael,
Thanks always for your time! amazing those details answers.
I looked at the code and see they did something like this:
beforeSerials = self._serials[:]
Then a few lines later followed by:
self._serials.append(MetaSerial(value=u'))
Then followed by
On Oct 13, 2013, at 7:45 AM, Martin Stettner martin.stett...@gmail.com wrote:
I'm using SqlAlchemy core to access my database. I'm just wondering if
there's a specific reason why the ResultProxy class doesn't implement the
__enter__ and __exit__ methods for automatically closing the results
I did some more digging today to see If I can pin down the exact reason:
I tested with a unit test, and reduced the code above to bare minimum and
not doing references to collections anymore.
def serials(self):
requiredAmountOfSerials = self.quantity
if
I'm glad you're still poking because I'm still not seeing anything that would
trigger this warning. Here is that exact code in a test case, I can't get it
to produce the warning:
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.ext.declarative import declarative_base
Base
On Oct 11, 2013, at 9:32 PM, Ken Lareau klar...@tagged.com wrote:
I have this at the end of my init_session():
Session.configure(bind=engine)
but I'm assuming that's not enough?
I don't have a full code example in front of me but I'd imagine that the recipe
you're using is injecting