-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7808149
Showing
4 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
``paste.evalexception`` lets you interactively debug exceptions in | ||
your WSGI app. ``z3c.evalexception`` is a small wrapper around that | ||
so that it works with the stock Zope 3 application server. | ||
|
||
Here's a simple PasteDeploy configuration file that sets up the Zope 3 | ||
application server on top of the WSGIUtils HTTP server with the | ||
``z3c.evalexception`` middleware:: | ||
|
||
[filter-app:main] | ||
use = egg:z3c.evalexception | ||
next = zope | ||
|
||
[app:zope] | ||
use = egg:zope.paste | ||
site_definition = parts/app/site.zcml | ||
file_storage = parts/data/Data.fs | ||
|
||
[server:main] | ||
use = egg:PasteScript#wsgiutils | ||
host = 127.0.0.1 | ||
port = 8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
from setuptools import setup, find_packages | ||
|
||
setup(name='z3c.evalexception', | ||
version = '1.0', | ||
license='ZPL 2.1', | ||
description="Paste's interactive exception debugger for Zope 3", | ||
author='Philipp von Weitershausen', | ||
author_email='philipp@weitershausen.de', | ||
long_description=open('README.txt').read(), | ||
packages=find_packages(), | ||
namespace_packages=['z3c'], | ||
install_requires=['setuptools', 'Paste'], | ||
zip_safe=True, | ||
entry_points=""" | ||
[paste.filter_app_factory] | ||
main = z3c.evalexception:zope_eval_exception | ||
""" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# this is a namespace package | ||
try: | ||
import pkg_resources | ||
pkg_resources.declare_namespace(__name__) | ||
except ImportError: | ||
import pkgutil | ||
__path__ = pkgutil.extend_path(__path__, __name__) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
from paste.evalexception.middleware import EvalException | ||
|
||
class ZopeEvalException(EvalException): | ||
|
||
def __call__(self, environ, start_response): | ||
environ['wsgi.handleErrors'] = False | ||
return super(ZopeEvalException, self).__call__(environ, start_response) | ||
|
||
def zope_eval_exception(app, global_conf): | ||
return ZopeEvalException(app) |