Re: [Zope-dev] using WSGIPublisher
Am 06.06.2012 um 19:58 schrieb Hanno Schlichting: […] > As I said above, my main concern is keeping publisher events and > exception views intact. Some of these events need to happen in code > that's currently inside repoze.* middleware. Like "before transaction > commit", "publication failure" or "publication success". […] +1 to re-add these events. In our WSGI projects it hurts that they are gone now. Yours sincerely, -- Michael Howitz · m...@gocept.com · software developer gocept gmbh & co. kg · Forsterstraße 29 · 06112 Halle (Saale) · Germany http://gocept.com · tel +49 345 1229889 8 · fax +49 345 1229889 1 Python, Pyramid, Plone, Zope - consulting, development, hosting, operations ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] zope-tests - FAILED: 2, OK: 39
This is the summary for test reports received on the zope-tests list between 2012-06-05 00:00:00 UTC and 2012-06-06 00:00:00 UTC: See the footnotes for test reports of unsuccessful builds. An up-to date view of the builders is also available in our buildbot documentation: http://docs.zope.org/zopetoolkit/process/buildbots.html#the-nightly-builds Reports received Bluebream / Python2.5.5 64bit linux Bluebream / Python2.6.7 64bit linux Bluebream / Python2.7.2 64bit linux ZTK 1.0 / Python2.4.6 Linux 64bit ZTK 1.0 / Python2.5.5 Linux 64bit ZTK 1.0 / Python2.6.7 Linux 64bit ZTK 1.0dev / Python2.4.6 Linux 64bit [1]ZTK 1.0dev / Python2.5.5 Linux 64bit ZTK 1.0dev / Python2.6.7 Linux 64bit ZTK 1.1 / Python2.5.5 Linux 64bit ZTK 1.1 / Python2.6.7 Linux 64bit ZTK 1.1 / Python2.7.2 Linux 64bit [2]ZTK 1.1dev / Python2.5.5 Linux 64bit ZTK 1.1dev / Python2.6.7 Linux 64bit ZTK 1.1dev / Python2.7.2 Linux 64bit Zope 3.4 KGS / Python2.4.6 64bit linux Zope 3.4 KGS / Python2.5.5 64bit linux Zope 3.4 Known Good Set / py2.4-32bit-linux Zope 3.4 Known Good Set / py2.4-64bit-linux Zope 3.4 Known Good Set / py2.5-32bit-linux Zope 3.4 Known Good Set / py2.5-64bit-linux Zope-2.10 Python-2.4.6 : Linux Zope-2.11 Python-2.4.6 : Linux Zope-2.12 Python-2.6.6 : Linux Zope-2.12-alltests Python-2.6.6 : Linux Zope-2.13 Python-2.6.6 : Linux Zope-2.13-alltests Python-2.6.6 : Linux Zope-trunk Python-2.6.6 : Linux Zope-trunk-alltests Python-2.6.6 : Linux winbot / ZODB_dev py_265_win32 winbot / ZODB_dev py_265_win64 winbot / ZODB_dev py_270_win32 winbot / ZODB_dev py_270_win64 winbot / ztk_10 py_254_win32 winbot / ztk_10 py_265_win32 winbot / ztk_10 py_265_win64 winbot / ztk_11 py_254_win32 winbot / ztk_11 py_265_win32 winbot / ztk_11 py_265_win64 winbot / ztk_11 py_270_win32 winbot / ztk_11 py_270_win64 Non-OK results -- [1]FAILED ZTK 1.0dev / Python2.5.5 Linux 64bit https://mail.zope.org/pipermail/zope-tests/2012-June/064011.html [2]FAILED ZTK 1.1dev / Python2.5.5 Linux 64bit https://mail.zope.org/pipermail/zope-tests/2012-June/064009.html ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Re: [Zope-dev] using WSGIPublisher
Hanno Schlichting writes: > On Wed, Jun 6, 2012 at 5:06 PM, Paul J Stevens wrote: >> FYI, I'm using the following buildout: >> >> https://github.com/pjstevns/plone.mongrel2 > > You are missing some required middleware for the current un-documented > WSGI feature. I made an experiment quite a while back and came up > with: > > https://github.com/hannosch/zope2-wsgi/blob/master/templates/zope.ini > > I've looked into WSGI again at the Plone Symposium East sprint and I > think we should remove the middleware approach again for Zope2. > Primarily as we loose some features like publisher events and > exception views, which in practice are used by Plone. There's a reason > why Pyramid came up with the tweens concept and I think there's little > benefit for existing Zope2 applications to be split up into > middleware. Since the repoze project itself isn't moving forward any > longer, there's little benefit in code re-use with it either. > > So I'd probably just merge back the exception and transaction handling > into the Zope2 WSGI publisher (keeping some of the code cleanup). +10. If there's anything I can do to help with this, I'd like to do so. I could start by just trying to copy the bits from the non-WSGI publisher back into the WSGI publisher. But I don't really know enough about the edge cases to write useful tests. Hanno, would that help or is this the kind of thing that you already have a clear notion of in your head and contributions won't really help? Ross ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Re: [Zope-dev] using WSGIPublisher
On Wed, Jun 6, 2012 at 7:06 PM, Tres Seaver wrote: > On 06/06/2012 12:11 PM, Hanno Schlichting wrote: >> I've looked into WSGI again at the Plone Symposium East sprint and I >> think we should remove the middleware approach again for Zope2. >> Primarily as we loose some features like publisher events and >> exception views, which in practice are used by Plone. [snip my subjective view on repoze project] >> So I'd probably just merge back the exception and transaction >> handling into the Zope2 WSGI publisher (keeping some of the code >> cleanup). > > That could still be a reasonable choice. Another choice would be to just > add an integration point into the publisher which wrapped the middleware > in at startup time, without requiring explicit configuration. As I said above, my main concern is keeping publisher events and exception views intact. Some of these events need to happen in code that's currently inside repoze.* middleware. Like "before transaction commit", "publication failure" or "publication success". For exception handling Plone wants to load some settings from inside the database. Mangling those into a WSGI environment is a bit tedious - having a real Zope request/response object makes that a bit easier. Hanno ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Re: [Zope-dev] using WSGIPublisher
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/06/2012 12:11 PM, Hanno Schlichting wrote: > On Wed, Jun 6, 2012 at 5:06 PM, Paul J Stevens wrote: >> FYI, I'm using the following buildout: >> >> https://github.com/pjstevns/plone.mongrel2 > > You are missing some required middleware for the current > un-documented WSGI feature. I made an experiment quite a while back > and came up with: > > https://github.com/hannosch/zope2-wsgi/blob/master/templates/zope.ini > > I've looked into WSGI again at the Plone Symposium East sprint and I > think we should remove the middleware approach again for Zope2. > Primarily as we loose some features like publisher events and > exception views, which in practice are used by Plone. There's a > reason why Pyramid came up with the tweens concept and I think there's > little benefit for existing Zope2 applications to be split up into > middleware. Since the repoze project itself isn't moving forward any > longer, there's little benefit in code re-use with it either. I don't think that is a reasonable characterizaztion: repoze.tm2, repoze.vhm etc. are stable and mature, but they aren't unmaintained: for instance, they actually support Python 3.2. Many he repoze.* packages are in heavy production use for many non-Zope applications. > So I'd probably just merge back the exception and transaction > handling into the Zope2 WSGI publisher (keeping some of the code > cleanup). That could still be a reasonable choice. Another choice would be to just add an integration point into the publisher which wrapped the middleware in at startup time, without requiring explicit configuration. Tres. - -- === Tres Seaver +1 540-429-0999 tsea...@palladion.com Palladion Software "Excellence by Design"http://palladion.com -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/PjgUACgkQ+gerLs4ltQ7q0gCgyrITqGyH72+y7q/sgIRoeIAc KJAAn3bSQY6iAErXAmjursPgTzuhoJzF =typz -END PGP SIGNATURE- ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
Re: [Zope-dev] using WSGIPublisher
On Wed, Jun 6, 2012 at 5:06 PM, Paul J Stevens wrote: > FYI, I'm using the following buildout: > > https://github.com/pjstevns/plone.mongrel2 You are missing some required middleware for the current un-documented WSGI feature. I made an experiment quite a while back and came up with: https://github.com/hannosch/zope2-wsgi/blob/master/templates/zope.ini I've looked into WSGI again at the Plone Symposium East sprint and I think we should remove the middleware approach again for Zope2. Primarily as we loose some features like publisher events and exception views, which in practice are used by Plone. There's a reason why Pyramid came up with the tweens concept and I think there's little benefit for existing Zope2 applications to be split up into middleware. Since the repoze project itself isn't moving forward any longer, there's little benefit in code re-use with it either. So I'd probably just merge back the exception and transaction handling into the Zope2 WSGI publisher (keeping some of the code cleanup). Hanno ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )
[Zope-dev] using WSGIPublisher
Hi all, I've been running a test-setup using ZPublisher/WSGIPublisher.py mongrel2 -> wsgid -> zope2 I'm running into some minor, some larger issues. Most importantly, transactions are not committed. You know better than I do what that means. For me, I can't create Plone sites, or even DTMLDocuments. And when I create then using ZServer, I can't delete them any more through the wsgi route. I have a small patch against WSGIPublisher.py (branch 2.13) that fixes above behaviour (attached). After applying it creating and deleting content works ok, but when using the sunburst theme, the created site looks completely unstyled, whereas using the classic plone theme everything looks much better. The plot thickens however because when I enable debug-mode, everything works great! Maybe someone with better understanding of the mechanics involved now has an epiphany. FYI, I'm using the following buildout: https://github.com/pjstevns/plone.mongrel2 thanks. -- Paul J Stevenspjstevns @ gmail, twitter, skype, linkedin * Premium Hosting Services and Web Application Consultancy * www.nfg.nl/i...@nfg.nl/+31.85.877.99.97 Index: src/ZPublisher/WSGIPublisher.py === --- src/ZPublisher/WSGIPublisher.py (revision 126531) +++ src/ZPublisher/WSGIPublisher.py (working copy) @@ -30,7 +30,8 @@ from ZPublisher.Publish import dont_publish_class from ZPublisher.Publish import get_module_info from ZPublisher.Publish import missing_name -from ZPublisher.pubevents import PubStart, PubBeforeCommit, PubAfterTraversal +from ZPublisher.pubevents import PubStart, PubBeforeCommit, \ +PubAfterTraversal, PubSuccess from ZPublisher.Iterators import IStreamIterator _NOW = None # overwrite for testing @@ -206,6 +207,12 @@ response.setBody(result) notify(PubBeforeCommit(request)) + +if transactions_manager: +transactions_manager.commit() + +notify(PubSuccess(request)) + return response ___ Zope-Dev maillist - Zope-Dev@zope.org 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 )