[sqlalchemy] Is it safe to re-use a closed session?

2018-04-05 Thread 'Brian Candler' via sqlalchemy
The documentation doesn't seem to be 100% clear on this point: if you close() a session, can you continue to use it as if it were a fresh session? (Unlike say a closed filehandle) In other words, in a non-threaded application, is this a

[sqlalchemy] When is session.close required?

2017-05-23 Thread 'Brian Candler' via sqlalchemy
Hello, I have a question about when "close" should or should not be called on a session. At http://docs.sqlalchemy.org/en/latest/orm/session_transaction.html it says: "When the transactional state is completed after a rollback or commit, the Session releases all Transaction and Connection