pyramid_tm is now a tween placed under excview. Thus the pipeline for a request ends up:
wsgi server <-> exception views <-> pyramid_tm <-> pyramid So the issue here is that pyramid_tm actually expires the commit *before* the exception view is executed. This means that you cannot do database operations in an exception view as it stands without managing the connection yourself. The rationale is behind this is that it makes the api for using the tm more sane. In the past pyramid_tm has used a commit veto that aborts when there is 4xx/5xx responses, exceptions, or x-tm=abort headers. This is fairly complicated and the current interface is simply to abort on exceptions. The old behavior is achievable by placing the pyramid_tm tween over excview instead of under, and using the default_commit_veto that you pasted. In terms of fixing this to allow database operations within your exception views, suggestions are welcome, but I think in general the new behavior is more sane. -- Michael -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com. To unsubscribe from this group, send email to pylons-discuss+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.