Re: [sqlalchemy] Re: SQLA pg upsert causes impl rollback, works thru CL query

2017-06-28 Thread Jonathan Vanasco
I understand your concerns. I dropped pyramid's transaction support a long time ago, and prefer to do everything explicitly. You should be aware that a scoped session and regular session are not 100% interchangeable. There are a few slight differences... though 99.9% of users won't be

Re: [sqlalchemy] Re: SQLA pg upsert causes impl rollback, works thru CL query

2017-06-28 Thread Richard Rosenberg
Jonathan: Yeah. That seems likely. However, I feel "closer" to my database after removing zope.sqlalchemy from the mix. I guess I'm at a point where there is such a thing as too much abstraction. . ? BTW, I did give the nested tx a try, but as we both now know it did not work, and probably

Re: [sqlalchemy] Re: SQLA pg upsert causes impl rollback, works thru CL query

2017-06-28 Thread Jonathan Vanasco
On Wednesday, June 28, 2017 at 4:28:32 PM UTC-4, Mike Bayer wrote: > > I'm not 100% sure that zope.sqlalchemy unconditionally emits COMMIT > for the session that's associated. Though overall would need to see > where you're getting request.session from and all that; if it's not > associated

Re: [sqlalchemy] Re: SQLA pg upsert causes impl rollback, works thru CL query

2017-06-28 Thread Richard Rosenberg
Mike: Thanks for your reply. This is a stock pyramid app built with their SQLA "scaffold." As expected, any attempt to directly use commit on the session results in: File "/home/richard/vp36/lib/python3.6/site-packages/zope.sqlalchemy-0.7.7-py3.6.egg/zope/sqlalchemy/datamanager.py", line

Re: [sqlalchemy] Re: SQLA pg upsert causes impl rollback, works thru CL query

2017-06-28 Thread Mike Bayer
I'm not 100% sure that zope.sqlalchemy unconditionally emits COMMIT for the session that's associated. Though overall would need to see where you're getting request.session from and all that; if it's not associated with zope.sqlalchemy then you'd need to call session.commit() explicitly. On Wed,