Dear list I am working on a project using pyramid 1.6, pyramid_tm 1.1.1 and SQLAlchemy 1.1.4.
A thread-local scoped_session object is used as suggested here <http://docs.pylonsproject.org/projects/pyramid/en/latest/quick_tutorial/databases.html> (knowing that this is probably not the best practice anymore) DBSession = scoped_session(sessionmaker(extension=ZopeTransactionExtension())) Strangely, I found out that the scoped_session returned by DBSession() is the identical object among several requests—when the request is handled by the same thread. Apparently, the DBSession.remove() is not called by the transaction manager as (I understand) it should be <http://docs.sqlalchemy.org/en/latest/orm/contextual.html#using-thread-local-scope-with-web-applications> . The problem can be resolved by event listeners either on the side of pyramid or SQLAlchemy but I think this should be directly handled by the transaction manager. Is this a faulty behavior, or did I get this wrong? Best Stefan -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/d569c9b4-f4ec-42f3-bd40-3c9e818ebe4d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
