5 messages in com.googlegroups.sqlalchemy[sqlalchemy] Re: couple of errors
FromSent OnAttachments
svilen26 Oct 2007 02:34.py, .py, .py
Michael Bayer26 Oct 2007 17:28 
Michael Bayer26 Oct 2007 18:00 
Michael Bayer26 Oct 2007 18:06 
Michael Bayer26 Oct 2007 18:19 
Subject:[sqlalchemy] Re: couple of errors
From:Michael Bayer (mike@zzzcomputing.com)
Date:10/26/2007 05:28:32 PM
List:com.googlegroups.sqlalchemy

3665 fixes ArgSingleton. as for session._sessions, that has to be something on your end..its just WeakValue to a Session object, SA doesnt reference those anywhere (unless, youre using ScopedSession, are creating many new threads and disposing them, since its using a TL. nothing new about that though, same as SessionContext in 0.3). try doing gc.collect().

will look at the endless loop soon...

On Oct 26, 2007, at 5:35 AM, svilen wrote:

hi i found 2 issues with latest SA:

* r3449 introduces a memory leak if SA is used and then all cleaned (clear_mappers() etc) - ArgSingleton is not cleared anymore and grows. Same applies to orm.session._sessions, but i dont know whats kept there. $ python _test_leak.py repeat=10 leak or $ python _test_leak.py repeat=1000 and watch memusage

* r3646 introduces some forever-recursion, goes like:

File "other/expression.py", line 355, in <module> p2 = session.query( Person).filter_by( name= 'pesho').first() File "sqlalchemy/orm/query.py", line 595, in first ret = list(self[0:1]) File "sqlalchemy/orm/query.py", line 620, in __iter__ context = self._compile_context() File "sqlalchemy/orm/query.py", line 873, in _compile_context value.setup(context) File "sqlalchemy/orm/interfaces.py", line 483, in setup self._get_context_strategy(querycontext).setup_query(querycontext, **kwargs) File "sqlalchemy/orm/strategies.py", line 553, in setup_query value.setup(context, parentclauses=clauses, parentmapper=self.select_mapper) File "sqlalchemy/orm/interfaces.py", line 483, in setup self._get_context_strategy(querycontext).setup_query(querycontext, **kwargs) File "sqlalchemy/orm/strategies.py", line 553, in setup_query value.setup(context, parentclauses=clauses, parentmapper=self.select_mapper)

... last two repeated ...

<_test_leak.py> <_test_recursion.py> <sa_gentestbase.py>