[Zope-dev] Fwd: Re: SVN: zope.server/branches/achapman-exc-info/src/zope/server/http/ further compliance with WSGI PEP.

Tres Seaver tseaver at palladion.com
Tue May 17 18:52:48 EDT 2011


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1



- -------- Original Message --------
Subject: Re: [Zope-dev] SVN:
zope.server/branches/achapman-exc-info/src/zope/server/http/ further
compliance with WSGI PEP.
Date: Tue, 17 May 2011 18:34:14 -0400
From: Tres Seaver <tseaver at palladion.com>
To: Satchidanand Haridas <satchit at zope.com>

On 05/17/2011 06:12 PM, Satchidanand Haridas wrote:

>> The WSGI PEP doesn't specify any WSGI specific exceptions.
>
>> - The sample CGI example that the PEP provides  also raises an AssertionError for this scenario:
>
>> 	http://www.python.org/dev/peps/pep-0333/#the-server-gateway-side
>
>> Also note that Paste's HTTP server (Paster) and CherryPy both raise AssertionErrors for this scenario:
>
>> - Paste: https://bitbucket.org/ianb/paste/src/4f5cfde87603/paste/httpserver.py#cl-166
>
>> - CherryPy: http://www.cherrypy.org/browser/trunk/py2/cherrypy/wsgiserver/__init__.py#L2050
>
>
>> Can you clarify what you meant by a WSGI-specific exception type?

I was thinking we would derive a custom exception type, e.g.:

  class WSGIException(Exception):
      pass

and then raise instances of it.  I didn't know that the other servers
were raising AssertionError, which still seems like the wrong thing to
raise at runtime in a production environment:  I guess we can follow
their lead in this case.


Tres.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3S/EAACgkQ+gerLs4ltQ6tPACgw3ZmjN6WheORNzh61fcafn05
CB0Anim/B6Ccaa4+KLCCyYn9IA7QdADE
=bjI7
-----END PGP SIGNATURE-----


More information about the Zope-Dev mailing list