[sqlalchemy] Re: Zope.sqalchemy: AttributeError: '_thread._local' object has no attribute 'value'

2020-10-25 Thread 'Jonathan Vanasco' via sqlalchemy
Your new code is exactly what I have been running on several production systems, so it looks good to me! Long story short, `zope.sqlalchemy` had been using the `sqlalchemy` "extensions", which were deprecated in 2012 and are set to be removed (if they haven't been already). see

[sqlalchemy] Re: Zope.sqalchemy: AttributeError: '_thread._local' object has no attribute 'value'

2020-10-25 Thread Dave Everitt
Thanks for the pointer to the source. My confusion came from the Zope docs (and other sources e.g. this answer: https://stackoverflow.com/a/58567212/123033 ) that seemed to suggest *EITHER* from zope.sqlalchemy import ZopeTransactionExtension, register *OR* changing all instances of

[sqlalchemy] Re: Zope.sqalchemy: AttributeError: '_thread._local' object has no attribute 'value'

2020-10-24 Thread Jonathan Vanasco
The extract code you posted is incorrect. You were given a step towards the right answer - you MUST invoke `register`. I say a step, because there may be other factors going on. However as you can see from the source code