[sqlalchemy] sqlalchemy gc and memory leak

2010-12-18 Thread drakkan
Hi, inspecting the gc I see a sqlalchemy memory leak in my application, here is the output from the gc: class 'sqlalchemy.engine.base.Connection': 2 - 3 (+1) class 'sqlalchemy.engine.base.RootTransaction': 2 - 3 (+1) class 'sqlalchemy.util.LRUCache': 1 - 2 (+1) class

Re: [sqlalchemy] sqlalchemy gc and memory leak

2010-12-18 Thread Michael Bayer
On Dec 18, 2010, at 5:32 AM, drakkan wrote: Hi, inspecting the gc I see a sqlalchemy memory leak in my application, here is the output from the gc: class 'sqlalchemy.engine.base.Connection': 2 - 3 (+1) class 'sqlalchemy.engine.base.RootTransaction': 2 - 3 (+1) class

Re: [sqlalchemy] Specifying a type for primary key results in strange behaviors

2010-12-18 Thread Michael Bayer
On Dec 18, 2010, at 2:45 PM, Lenza McElrath wrote: I am writing a system where I want my DB primary keys to be represented in the system by a type other than an integer. I have run into several issues with this: 1) I tried using a TypeDecorator, but SQLAlchemy does not like this. Seems

[sqlalchemy] Money data type for Postgres

2010-12-18 Thread Eric Ongerth
Postgres deprecated the Money data type around 8.2 but then brought it back with better support soon after (I think 8.3 or 8.4 and after). I found the following message on this group, where Mike welcomes anyone to just roll their own type stuff for it or possibly submit a patch.

[sqlalchemy] Re: Money data type for Postgres

2010-12-18 Thread Eric Ongerth
Hmm, I read through all of the relevant files, postgresql.py and the rest, and of course this section of the SA docs: http://www.sqlalchemy.org/docs/core/types.html#custom-types But I'm confused about a couple of things. One: what I'm reading seems to be suggesting that I just ignore the

[sqlalchemy] Re: Money data type for Postgres

2010-12-18 Thread Eric Ongerth
Meanwhile... meh. I'll be more than happy to go with Numeric(16,2) as suggested by #postgresql. Should work fine and the only disadvantage is the most minor of semantic objections. On Dec 18, 1:57 pm, Eric Ongerth ericonge...@gmail.com wrote: Hmm, I read through all of the relevant files,

[sqlalchemy] Double relation cascade problem?

2010-12-18 Thread Joseph Tate
I have the schema described in the test script located here: http://pastebin.com/qeB0vKVV If you run the script, you can see that there is a ConcurrentModificationError: when I go to delete the contest. If I delete the contestants first, there is no problem. The problem seems to be caused