[sqlalchemy] is this a sqlalchemy memory leak?

2012-08-28 Thread hackie chain
When I was using sqlalchemy 0.7.8 to manipulate database, it look's like the query have some memory leak..I have googled this problem for a long time, but no gains. I have tried run this snippet in a while loop. The code eat 1M every 5 second. environment is Python 2.7.3, mysql 5.5.25a, fedora

Re: [sqlalchemy] Session query on different server is not returning an object

2012-08-28 Thread Jakob D.
Shouldn't open transactions within the session close when I issue a session.remove() I've also tried combinations of close, rollback and commit. I do not work towards the cacheing in this service. Does an open transaction mean I cannot issue any queries at all before closing them? Because when

Re: [sqlalchemy] making bindparms required by default

2012-08-28 Thread alex bodnaru
thanks michael, On 08/27/2012 07:49 PM, Michael Bayer wrote: Here's a patch: diff -r 594b0162e8a5 lib/sqlalchemy/sql/expression.py --- a/lib/sqlalchemy/sql/expression.pyMon Aug 27 12:33:10 2012 -0400 +++ b/lib/sqlalchemy/sql/expression.pyMon Aug 27 12:43:48 2012 -0400 @@

Re: [sqlalchemy] making bindparms required by default

2012-08-28 Thread alex bodnaru
On 08/27/2012 10:13 PM, Michael Bayer wrote: I'm super-hot to get the first betas of 0.8 out the door, and as this is a backwards-compatability-sensitive change, I was in a super rush to get this in, so it's in tip. seen it' thanks again :). On Aug 27, 2012, at 12:49 PM, Michael Bayer

[sqlalchemy] Re: is this a sqlalchemy memory leak?

2012-08-28 Thread hackie chain
MySQLdb version is 1.2.3c1. not 1.2.2. http://docs.sqlalchemy.org/en/latest/dialects/mysql.html#known-issues -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To view this discussion on the web visit

[sqlalchemy] Re: is this a sqlalchemy memory leak?

2012-08-28 Thread hackie chain
It is the problem of myself. Sorry for the noise.. -_-||| http://docs.sqlalchemy.org/en/rel_0_6/orm/session.html#frequently-asked-questions -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To view this discussion on the web visit

Re: [sqlalchemy] Session query on different server is not returning an object

2012-08-28 Thread Michael Bayer
On Aug 28, 2012, at 2:54 AM, Jakob D. wrote: Shouldn't open transactions within the session close when I issue a session.remove() yes. Does an open transaction mean I cannot issue any queries at all before closing them? You can issue as many queries as you want at any time. the

[sqlalchemy] OrderingList weird reordering after session.commit()

2012-08-28 Thread Gilles Lenfant
Hi, I extracted the code from a complex application and isolated the issue I'm actually facing in a short sample here : https://gist.github.com/3499127 To summarize : I need a parent entity that has ordered children. I use for this a sqlalchemy.ext.orderinglist.ordering_list that is supposed

Re: [sqlalchemy] Issues with scoped sessions and webtest.

2012-08-28 Thread Michael Bayer
On Aug 28, 2012, at 11:49 AM, Owen Nelson wrote: As a guess, I think this has to do with how scoped sessions work, but exactly how they work is a bit of a mystery to me. Have you seen anything like this behavior before? I'm not quite sure how to investigate further into this issue, so

Re: [sqlalchemy] Issues with scoped sessions and webtest.

2012-08-28 Thread Owen Nelson
I was under the impression that the query property was implemented as part of the scoped session (not the non-scoped variety) from reading the docs. Is this not the case? If this isn't the case, I wonder if my issues will just *go away* by switching the type of session I work with (while

Re: [sqlalchemy] Issues with scoped sessions and webtest.

2012-08-28 Thread Owen Nelson
On Tuesday, August 28, 2012 1:45:55 PM UTC-4, Michael Bayer wrote: On Aug 28, 2012, at 1:15 PM, Owen Nelson wrote: I was under the impression that the query property was implemented as part of the scoped session (not the non-scoped variety) from reading the docs. Is this not the case?

Re: [sqlalchemy] Issues with scoped sessions and webtest.

2012-08-28 Thread Michael Bayer
On Aug 28, 2012, at 2:06 PM, Owen Nelson wrote: mmm yeah I can't really say from this end. You'd need to get in there and see exactly at which point sessions are being set up and torn down. But I'm pretty sure you don't have any extra threads going on unless you have something in your

Re: [sqlalchemy] Issues with scoped sessions and webtest.

2012-08-28 Thread Owen Nelson
On Tuesday, August 28, 2012 2:12:10 PM UTC-4, Michael Bayer wrote: is there any chance you can get your test suite to run in a regular environment first ?app engine supposedly has extra weird behaviors like MySQL connections that go away randomly and stuff like that. right now the

Re: [sqlalchemy] PickleType collections of rows?

2012-08-28 Thread Jacob Biesinger
Yes, this is the pattern I'm trying to describe though I've been thinking of these as typed collections, smallish tables for handling a particular table's collections needs, which are all of a single type (so rows are either a collection or a FK to ONE other table). It feels very doable,

Re: [sqlalchemy] PickleType collections of rows?

2012-08-28 Thread Michael Bayer
Well, you dug into a really esoteric and complex example there. association_proxy is a much easier way to get around these cases where you want an object to act like a scalar, so here's that, without all that crazy boilerplate of the vertical example, which I'd avoid as it is really too

[sqlalchemy] getting results uncidoe from mssql with pyodbc (where mssql encoding is windows-1255) using turbogears scoped DBSession

2012-08-28 Thread alonn
some of my sqlalchemy 0.7.3 (with tubrogears 2.1.4) models work with a mssql 2005 db using pyodbc. (No can't change this, don't bother suggesting, this is an enterprise financial system, I can just read and write to certain tables there) the query returned are encoded windows-1255 instead of

Re: [sqlalchemy] getting results uncidoe from mssql with pyodbc (where mssql encoding is windows-1255) using turbogears scoped DBSession

2012-08-28 Thread Michael Bayer
what ODBC driver ? the encoding issues are typically configured with ODBC. it's a huge difference if you're on the windows drivers, vs. freetds, vs anything else. also I use MSSQL 2005 in production financial applications as well. On Aug 28, 2012, at 4:43 PM, alonn wrote: some of my

Re: [sqlalchemy] OrderingList weird reordering after session.commit()

2012-08-28 Thread Michael Bayer
On Aug 28, 2012, at 11:59 AM, Gilles Lenfant wrote: Hi, I extracted the code from a complex application and isolated the issue I'm actually facing in a short sample here : https://gist.github.com/3499127 To summarize : I need a parent entity that has ordered children. I use for this a