Re: zope.sqlalchemy+py3 test failures.

Laurence Rowe <[email protected]>
Newsgroups gmane.comp.web.zope.devel
Message-ID <CAOycyLTr3ZQctyE0h6n0a_wfMMd8ZRSqgdQstRdSPHdEM85HJw@mail.gmail.com>
On 29 September 2011 16:51, Chris Withers <[email protected]> wrote:
> It'd also be great if we could get support for SA 0.7+'s new events
> system...

I'm not convinced this will give any benefit. Currently we just require:

>>> Session = scoped_session(sessionmaker(bind=engine,
...         extension=ZopeTransactionExtension()))

Instead we would require something like:

>>> Session = scoped_session(sessionmaker(bind=engine))
>>> ext = ZopeTransactionExtension()
>>> event.listen(Session, "after_attach", ext.after_attach)
>>> event.listen(Session, "after_begin", ext.after_begin)
>>> event.listen(Session, "after_flush", ext.after_flush)
>>> event.listen(Session, "after_bulk_update", ext.after_bulk_update)
>>> event.listen(Session, "after_bulk_delete", ext.after_bulk_delete)
>>> event.listen(Session, "before_commit", ext.before_commit)

Though this could become:

>>> Session = scoped_session(sessionmaker(bind=engine))
>>> ZopeTransactionExtension(Session)

I'm just not sure that it's worthwhile.

Laurence
_______________________________________________
Zope-Dev maillist  -  [email protected]
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.