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
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
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