[sqlalchemy] SAWarning: Did not recognize type

2010-10-06 Thread jgs9000
Hi I've seen a post or two about this warning, and was wondering if there is any update to the recommended ways to deal with it. Specifically - I'm using Python 2.7, SQLAlchemy 0.6.3, Postgres 8.1.18 and using 'autoload' to reflect the underlying table. I'm hitting this warning for the

[sqlalchemy] Session problems

2010-10-06 Thread Warwick Prince
Dear All I'm having a very strange issue with Sessions that I'm hoping someone can guide me on; I have a situation where a large body of code spawns new processes (multiprocessing.process). The core design manages 3 (possible) database connections, and I've used a unique session for each. The

Re: [sqlalchemy] Session problems

2010-10-06 Thread Chris Withers
On 06/10/2010 10:46, Warwick Prince wrote: (InterfaceError) 2055: Lost connection to MySQL server at '192.168.50.2:3306 http://192.168.50.2:3306', system error: 10054 u'SELECT products.. ...it would be interesting to see the rest of that error message... Chris -- You received this

[sqlalchemy] Session problems

2010-10-06 Thread Warwick Prince
Hi All More details on the session issue; Please note, the test I just did was this; Restart the mySQL server. Start Process #1 and create a session and use it (works fine) Start Process #2 (Identical code to #1, just another instance). Go back to #1 and attempt to do another query and I get

Re: [sqlalchemy] bug with declarative's _decl_class_registry

2010-10-06 Thread Chris Withers
On 05/10/2010 18:03, Michael Bayer wrote: Also, is there a 'trunk' or 'tip' anywhere now to put 0.7-targeted code? there's not. You'd make a bitbucket repo and link to it on the trac ticket. Done: http://www.sqlalchemy.org/trac/changeset/6868:d8580d6765d4

Re: [sqlalchemy] NUMERIC in sqlite

2010-10-06 Thread Michael Bayer
On Oct 5, 2010, at 11:34 PM, csingley wrote: Hi, I'm just learning to use sqlalchemy now (although I've had some exposure to SQLObject and Django ORM, so not completely new to the game). I'd like to address a standard ORM issue - i.e. interfacing Python Decimal objects with SQLite

Re: [sqlalchemy] SAWarning: Did not recognize type

2010-10-06 Thread Michael Bayer
On Oct 6, 2010, at 2:02 AM, jgs9000 wrote: Hi I've seen a post or two about this warning, and was wondering if there is any update to the recommended ways to deal with it. Specifically - I'm using Python 2.7, SQLAlchemy 0.6.3, Postgres 8.1.18 and using 'autoload' to reflect the

Re: [sqlalchemy] Session problems

2010-10-06 Thread Michael Bayer
On Oct 6, 2010, at 5:46 AM, Warwick Prince wrote: Dear All I'm having a very strange issue with Sessions that I'm hoping someone can guide me on; I have a situation where a large body of code spawns new processes (multiprocessing.process). The core design manages 3 (possible)

Re: [sqlalchemy] Session problems

2010-10-06 Thread Michael Bayer
On Oct 6, 2010, at 6:46 AM, Warwick Prince wrote: I can't quite get my head around the scope of sessionmaker() yet.. I've tried putting Session = sessionmaker() as a global to the entire codebase (works but has same problem) do you mean scoped_session here ? sessionmaker is just a

Re: [sqlalchemy] NUMERIC in sqlite

2010-10-06 Thread Christopher Singley
Thanks for the reply! On Wed, Oct 6, 2010 at 9:06 AM, Michael Bayer mike...@zzzcomputing.com wrote: SQlite has no lossless DECIMAL type and SQLAlchemy can't work around that. Well SQLAlchemy itself suggests workarounds that it doesn't implement, so here we are... The approaches to working

Re: [sqlalchemy] NUMERIC in sqlite

2010-10-06 Thread Michael Bayer
On Oct 6, 2010, at 11:00 AM, Christopher Singley wrote: Thanks for the reply! On Wed, Oct 6, 2010 at 9:06 AM, Michael Bayer mike...@zzzcomputing.com wrote: SQlite has no lossless DECIMAL type and SQLAlchemy can't work around that. Well SQLAlchemy itself suggests workarounds that it

Re: [sqlalchemy] NUMERIC in sqlite

2010-10-06 Thread Conor
On 10/06/2010 10:00 AM, Christopher Singley wrote: [...] 2. store the decimals as integers, using a type with a fixed exponent. Use Integer, and place a TypeDecorator around it which multiplies Decimal objects upwards by the fixed exponent going in and back down going out. Is it as

Re: [sqlalchemy] NUMERIC in sqlite

2010-10-06 Thread Christopher Singley
On Wed, Oct 6, 2010 at 10:12 AM, Michael Bayer mike...@zzzcomputing.com wrote: Well such a type wouldn't be backend agnostic.  The String/Integer wrapped one would act very differently than a Numeric.   So not much point in a transparent switch like that.   We try to keep switches like that

Re: [sqlalchemy] Session problems

2010-10-06 Thread Warwick Prince
Hi All Just incase anyone was wondering.. I found the cause of my session issues. (Hooray!) The Application is served by a home grown python HTTP server which works just fine - however, I found that it had an implementation of threading POOL to handle requests, rather than creating a new thread

[sqlalchemy] Confoo 2011 Call for speakers

2010-10-06 Thread Mathieu Leduc-Hamel
Greetings Alchemists, We, Montréal-Python, are the coordinators of the Python track at ConFoo 2011 and we are very proud to announce our call for speakers. PHP-Québec, Montréal-Python, Montreal.rb, W3Qc, and OWASP Montréal are organizing the first edition of the ConFoo conference, which will be

[sqlalchemy] Session problems

2010-10-06 Thread Warwick Prince
Hi Michael I'm still having a couple of issues with the sessions, but I'm now starting to suspect mysqlconnector.. For completeness, could you please let me know if there is anything specific I need to do to close down a session / connection / engine etc if I want to completely release it.