[Framework-Team] repoze.zope2

Chris McDonough chrism at plope.com
Fri Dec 19 13:38:56 UTC 2008


Hi folks,

I was encouraged to write down the main differences between the "stock" Zope2
publisher and the publisher that is inside repoze.zope2 (which is in use by the
current Plone trunk).

- Conflict error retry management is moved out into WSGI middleware
  (repoze.retry).

- Trace (-M) logging is moved out into WSGI middleware (see repoze.debug).

- Access (apache-style) logging is moved out into WSGI middleware (see Paste's
  translogger).

- Transaction management is moved out into WSGI middleware (see repoze.tm).

- Top-level exception handling is moved out into WSGI middleware (cgitb
  or evalerror)

- Logging exceptions to the console is now performed by middleware
  (repoze.errorlog).

- An alternate spelling for virtual hosting is supported (no
  VirtualHostMonster needed).  See http://plope.com/Members/chrism/vhm_victory.
  Note that traditional virtual hosting still works, however, as well.

- You can return any iterable to the publisher (such as a file), and it will
  be treated as the response.

Some fallout from these differences:

Some "advanced" stuff is configurable via the paste.ini file, such as the
publisher output encoding ("encoding"), the Zope root object name ("appname"),
and whether or not we try to do a redirect for a browser default
("browser_default_redirects").  These are set to the least surprising options by
default.

"standard_error_message" will not work because the publisher no longer acts as
the top-level error handler.  A "pretty" exception handler will need to be
plugged in as WSGI middleware.

The "error_log" object will not work.  Use zope.errorlog instead (visit
/__error_log__ in the browser).

No testing has been done with "IStreamIterator" objects.  These may or may not
work.  If they don't work, it's trivial to make them work.

The most recent version of repoze.zope2 is 1.0 available from
http://dist.repoze.org/zope2/latest/.  The subversion repository is
http://svn.repoze.org/repoze.zope2/trunk/ .

I'll be happy to help with any porting problems / questions.

- C




More information about the Framework-Team mailing list