there's no class level GC cycle when dealing with the Session object, no, this
bug is local to the ad-hoc subclass mechanism of sessionmaker().
On Jan 11, 2013, at 2:01 AM, Anoop K wrote:
OK.
So does Session(bind=engine, expire_on_commit=False) usage always guarantee
that engine and
I tried the code in my setup.(SQLAlchemy-0.7.8-py2.6). Looks like engine
did not got GCed.
*[anoop@localhost tmp]$ p engtest.py *
*about to delete sn...*
*about to gc.collect()...*
*Traceback (most recent call last):*
* File engtest.py, line 31, in module*
*assert engine_is_removed*
there's some side effect occurring as a result of how 0.7 creates a new
subclass when using sessionmaker. Since you don't need a sessionmaker here,
please use this form:
return Session(bind=engine, expire_on_commit=False)
or upgrade to 0.8.0b2.
On Jan 11, 2013, at 1:08 AM, Anoop K wrote:
*Great ...*
Session(bind=engine, expire_on_commit=False) fixed the problem.
Looks like 0.8.0b2 is BETA. Is it OK to use in production ?
Thanks
Anoop
On Friday, 11 January 2013 11:48:29 UTC+5:30, Michael Bayer wrote:
there's some side effect occurring as a result of how 0.7 creates a new
the sessionmaker() object is not GC-able in 0.7 right now due to event
mechanics. This issue does not exist in 0.8. I'll add a note.
On Jan 11, 2013, at 1:18 AM, Michael Bayer wrote:
there's some side effect occurring as a result of how 0.7 creates a new
subclass when using
its beta very close to release
On Jan 11, 2013, at 1:29 AM, Anoop K wrote:
Great ...
Session(bind=engine, expire_on_commit=False) fixed the problem.
Looks like 0.8.0b2 is BETA. Is it OK to use in production ?
Thanks
Anoop
On Friday, 11 January 2013 11:48:29 UTC+5:30, Michael Bayer
the event mechanics issue applies to 0.7 and 0.8. while the engine will be
gc'ed in 0.8, the sessionmaker itself, if used, will still create an anonymous
subclass that is not cleared. creating many ad-hoc sessionmaker() objects,
while this was not its intended use, will cause memory to
OK.
So does Session(bind=engine, expire_on_commit=False) usage
always guarantee that engine and all other associated objects are cleared
on doing a session.close() + engine.dispose().
On Friday, 11 January 2013 12:27:16 UTC+5:30, Michael Bayer wrote:
the event mechanics issue applies to