[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

[sqlalchemy] Re: 0.6 and c extensions

2010-03-22 Thread drakkan
On 21 Mar, 21:11, Gaetan de Menten gdemen...@gmail.com wrote: On Sun, Mar 21, 2010 at 17:13, drakkan drakkan1...@gmail.com wrote: On 21 Mar, 14:31, Antoine Pitrou solip...@pitrou.net wrote: Le dimanche 21 mars 2010 à 02:10 -0700, drakkan a écrit : a really interesting feature in sa 0.6

[sqlalchemy] 0.6 and c extensions

2010-03-21 Thread drakkan
can use the same code on x86,x86_64, arm ecc.. what do you think about? drakkan -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this group, send email

[sqlalchemy] Re: 0.6 and c extensions

2010-03-21 Thread drakkan
On 21 Mar, 14:31, Antoine Pitrou solip...@pitrou.net wrote: Le dimanche 21 mars 2010 à 02:10 -0700, drakkan a écrit : Hi, a really interesting feature in sa 0.6 are the c extensions, however I think they should be implemented using ctypes so if python ctypes extension is available

[sqlalchemy] Problem with many-to-many relation on the same table

2010-02-09 Thread drakkan
Hi all, my class Clients inherits from BaseApparati and a client can have multiple relations with others clients. I use the class ClientCrossRef as table for the relation. class BaseApparati(Base, Dictionaryable): __tablename__ = 'baseapparati' id = Column(Integer,

[sqlalchemy] Re: sqlite and thread

2009-12-19 Thread drakkan
On 16 Dic, 19:03, Michael Bayer mike...@zzzcomputing.com wrote: drakkan wrote: Hi, connectionstring = 'sqlite:///' + settings.DATABASE_PATH+'? check_same_thread=False' #engine = create_engine(connectionstring, echo=settings.DEBUG, echo_pool=settings.DEBUG) engine = create_engine

[sqlalchemy] Re: sqlite and thread

2009-12-19 Thread drakkan
On 20 Dic, 00:03, Michael Bayer mike...@zzzcomputing.com wrote: On Dec 19, 2009, at 4:50 PM, drakkan wrote: On 16 Dic, 19:03, Michael Bayer mike...@zzzcomputing.com wrote: drakkan wrote: Hi, connectionstring = 'sqlite:///' + settings.DATABASE_PATH+'? check_same_thread=False

[sqlalchemy] Re: sqlite and thread

2009-12-19 Thread drakkan
Thanks I found my error: I defined my session as scoped session but in a global file I was redefining it as session=sess() and session was not more scoped On 20 Dic, 00:37, Michael Bayer mike...@zzzcomputing.com wrote: On Dec 19, 2009, at 6:20 PM, drakkan wrote: Sorry, I don't fully

[sqlalchemy] sqlite and thread

2009-12-16 Thread drakkan
Hi, I'm using a sqlite file based database, I'm having problem making database calls from two different thread, the error is the following: SQLite objects created in a thread can only be used in that same thread here is my sa configuration: from sqlalchemy.orm import sessionmaker from

[sqlalchemy] Oracle timestamp and postgres datetime compatibility

2009-12-02 Thread drakkan
Hi all, I have a sa model working with postgres, here is a code fragment: class Test(Base): __tablename__ = 'test' fileld1= Column(Unicode(40), nullable=False, primary_key=True) date = Column(DateTime, nullable=False) in postgres the sqltypes.DateTime is converted in:

[sqlalchemy] avoid select nextval bedore insert

2009-08-10 Thread drakkan
Hi, I'm using postgres, sqlalchemy on every insert for the primary key do select nexval , postgres ia able to find itself the id, there is a way to avoid this select? thanks drakkan --~--~-~--~~~---~--~~ You received this message because you are subscribed

[sqlalchemy] share objects with threads and scoped_session

2009-08-05 Thread drakkan
') what is the correct way to share object between different threads? regards drakkan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com

[sqlalchemy] Re: share objects with threads and scoped_session

2009-08-05 Thread drakkan
object at 0x2383050 is this the intended behaviuor? thanks drakkan On 5 Ago, 11:27, drakkan drakkan1...@gmail.com wrote: Hi all, I'm trying to share an object with a thread, I already tryed to use Session.merge but I'm doing something wrong, here is a test case: from sqlalchemy import

[sqlalchemy] Re: Thread problem

2009-08-03 Thread drakkan
= create_engine(connectionstring, echo=settings.DEBUG, echo_pool=settings.DEBUG, pool_size=20, max_overflow=400) s = scoped_session(sessionmaker(bind=engine)) so the session was not scoped and give the errors I report, thanks for your support, regards drakkan

[sqlalchemy] Thread problem

2009-08-02 Thread drakkan
Hi all, I know sqlalchemy session is not thread safe but in my application I need to use thread, I have my session defined as following: engine = create_engine(connectionstring, echo=settings.DEBUG, echo_pool=settings.DEBUG, pool_size=20,

[sqlalchemy] Re: Thread problem

2009-08-02 Thread drakkan
threads making the same query On 3 Ago, 00:49, drakkan drakkan1...@gmail.com wrote: In my postgres log I have: ERROR:  duplicate key value violates unique constraint allarmi_pkey when sqlalchemy give the error but nothing when the application hangs On 2 Ago, 23:45, Michael Bayer mike

[sqlalchemy] Re: Thread problem

2009-08-02 Thread drakkan
drakkan On 3 Ago, 03:20, Michael Bayer mike...@zzzcomputing.com wrote: On Aug 2, 2009, at 9:02 PM, drakkan wrote: here is a sample sa output when the application hangs: 009-08-03 01:05:20,458 INFO sqlalchemy.engine.base.Engine.0x...1634 {'param_1': None} 2009-08-03 01:05:33,673 INFO

[sqlalchemy] Re: Thread problem

2009-08-02 Thread drakkan
) t.start() with range(1) works as expect, if you change the range the script hang or give errors, I'm using scoped_session as you suggested On 3 Ago, 03:34, drakkan drakkan1...@gmail.com wrote: After the select there is an insert, can three concurrent threads inserting data in the same table cause

[sqlalchemy] Migration from django orm: override save method?

2009-06-15 Thread drakkan
method field1 is converted to upper but if i modify the field I have to manually convert to upper. There is some way to override save method as in django orm? regards drakkan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

[sqlalchemy] Re: Migration from django orm: override save method?

2009-06-15 Thread drakkan
', descriptor=property (_get_field1,_set_field1)) thanks drakkan On 15 Giu, 17:52, Laurent Rahuel laurent.rah...@gmail.com wrote: Hi, You should take a look at MapperExtension. Then you'll be able to add method which would be called depending on the orm actions. For example, you'll be able to add

[sqlalchemy] On delete cascade, set null

2009-02-01 Thread drakkan
objects in memory and without perform an update? regards drakkan --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from

[sqlalchemy] many to many extra fields and association object

2009-01-06 Thread drakkan
): return 'SambaShare: nome=%s, path=%s' % ( self.nome,self.path) in samba share I removed secondary but now how sqlalchemy know about m2m relation? thanks drakkan --~--~-~--~~~---~--~~ You received this message because you