For older versions of pyramid the setup for sqlalchemy session was done
with scooped_session similar to this
DBSession = scoped_session(
sessionmaker(
autoflush=True,
expire_on_commit=False,
extension=zope.sqlalchemy.ZopeTransactionExtension()
)
However I see that newer tutorials as well the pyramid docs
<http://docs.pylonsproject.org/projects/pyramid/en/latest/tutorials/wiki2/basiclayout.html#content-models-with-the-models-package>
'promotes'
sqlalchemy with no threadlocals where the DBSession is attached to the
request object.
Is the 'old' way broken and what is the advantage of the no threadlocals ?
thanks!
ps: posted as well
http://stackoverflow.com/questions/40922933/pyramid-with-sqlalchemy
--
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/4413dd47-971b-41af-9fda-f82574c2d62f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.