Re: [sqlalchemy] Session remove/close MySQL

2014-02-12 Thread Christian Démolis
Thx all NullPool solve my problem create_engine(cnx_str, poolclass=NullPool) 2014-02-07 19:11 GMT+01:00 Claudio Freire klaussfre...@gmail.com: On Fri, Feb 7, 2014 at 2:35 PM, Michael Bayer mike...@zzzcomputing.com wrote: The connection pool, if in use, will then not actually close the

[sqlalchemy] Session remove/close MySQL

2014-02-07 Thread Christian Démolis
Hi all, Actually, i have some problem closing my session... I tried using scopedsession with session.remove I tried using normal session with session.close But in both cases, the Mysql session stay open. Why closing session has no effet on current Mysql connections ? -- You received this

Re: [sqlalchemy] Session remove/close MySQL

2014-02-07 Thread Simon King
On Fri, Feb 7, 2014 at 9:28 AM, Christian Démolis christiandemo...@gmail.com wrote: Hi all, Actually, i have some problem closing my session... I tried using scopedsession with session.remove I tried using normal session with session.close But in both cases, the Mysql session stay open.

Re: [sqlalchemy] Session remove/close MySQL

2014-02-07 Thread Michael Bayer
On Feb 7, 2014, at 11:01 AM, Claudio Freire klaussfre...@gmail.com wrote: I've had similar issues with 0.7.10. SA opens an implicit transaction, incorrect, DBAPI does this, please see: http://www.python.org/dev/peps/pep-0249/#commit there is no “explicit transaction” in DBAPI. The docs

Re: [sqlalchemy] Session remove/close MySQL

2014-02-07 Thread Claudio Freire
I knew I should've been more explicit On Fri, Feb 7, 2014 at 1:07 PM, Michael Bayer mike...@zzzcomputing.com wrote: On Feb 7, 2014, at 11:01 AM, Claudio Freire klaussfre...@gmail.com wrote: I've had similar issues with 0.7.10. SA opens an implicit transaction, incorrect, DBAPI does this,

Re: [sqlalchemy] Session remove/close MySQL

2014-02-07 Thread Claudio Freire
On Fri, Feb 7, 2014 at 2:35 PM, Michael Bayer mike...@zzzcomputing.com wrote: The connection pool, if in use, will then not actually close the connection if it is to remained pooled, it calls rollback() as part of the pool release mechanism. Recent versions of SQLAlchemy allow this to show up

Re: [sqlalchemy] Session remove/close MySQL

2014-02-07 Thread Michael Bayer
On Feb 7, 2014, at 11:16 AM, Claudio Freire klaussfre...@gmail.com wrote: and neither Session.remove nor Session.close really roll back the transaction No, but the connection pool should. (reset_on_return, which I have enabled) reset_on_return is on by default. the pool has always emitted

Re: [sqlalchemy] Session remove/close MySQL

2014-02-07 Thread Claudio Freire
On Fri, Feb 7, 2014 at 11:51 AM, Simon King si...@simonking.org.uk wrote: On Fri, Feb 7, 2014 at 9:28 AM, Christian Démolis christiandemo...@gmail.com wrote: Hi all, Actually, i have some problem closing my session... I tried using scopedsession with session.remove I tried using normal