I recently encountered this little snippet of code at the beginning of a transaction
# I am surprised we need to call both of these, but # we do. Neither alone will prevent stale data from # persisting in the session. meta.Session.expunge_all() meta.Session.rollback() I have looked through the SQLA documentation (1.3) and I cannot find any reason why simply using a rollback() would not suffice here. Maybe it was necessary when the code was written for an older version of SQLA. Does anyone have any thoughts on the matter? -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sqlalchemy/55af2158-c110-40e8-b79e-ff320dafeb6a%40googlegroups.com.