[Checkins] SVN: grokcore.rest/trunk/ cleanup auto-checkout and now depend on zope.errorview
Jan-Wijbrand Kolman
janwijbrand at gmail.com
Tue Jan 18 11:45:39 EST 2011
Log message for revision 119663:
cleanup auto-checkout and now depend on zope.errorview
Changed:
U grokcore.rest/trunk/buildout.cfg
U grokcore.rest/trunk/setup.py
U grokcore.rest/trunk/src/grokcore/rest/configure.zcml
U grokcore.rest/trunk/src/grokcore/rest/ftesting.zcml
U grokcore.rest/trunk/src/grokcore/rest/ftests/rest/rest.py
U grokcore.rest/trunk/src/grokcore/rest/meta.zcml
-=-
Modified: grokcore.rest/trunk/buildout.cfg
===================================================================
--- grokcore.rest/trunk/buildout.cfg 2011-01-18 16:37:46 UTC (rev 119662)
+++ grokcore.rest/trunk/buildout.cfg 2011-01-18 16:45:38 UTC (rev 119663)
@@ -7,6 +7,8 @@
extensions =
buildout.dumppickedversions
mr.developer
+auto-checkout =
+ zope.errorview
[versions]
grokcore.rest =
@@ -16,7 +18,7 @@
eggs =
grokcore.rest
grokcore.rest[test]
-defaults = ['--tests-pattern', '^f?tests$', '-v', '-c']
+defaults = ['--tests-pattern', '^f?tests$', '-v', '--auto-color']
[omelette]
recipe = collective.recipe.omelette
Modified: grokcore.rest/trunk/setup.py
===================================================================
--- grokcore.rest/trunk/setup.py 2011-01-18 16:37:46 UTC (rev 119662)
+++ grokcore.rest/trunk/setup.py 2011-01-18 16:45:38 UTC (rev 119663)
@@ -14,14 +14,13 @@
)
tests_require = [
- 'grokcore.view [test]',
+ 'grokcore.content',
'grokcore.view [security_publication]',
- 'zope.testing',
- 'zope.app.wsgi',
+ 'grokcore.view [test]',
'zope.app.appsetup',
-# 'zope.app.exception',
-# 'zope.app.http',
- 'grokcore.content',
+ 'zope.app.wsgi',
+ 'zope.errorview',
+ 'zope.testing',
]
setup(
Modified: grokcore.rest/trunk/src/grokcore/rest/configure.zcml
===================================================================
--- grokcore.rest/trunk/src/grokcore/rest/configure.zcml 2011-01-18 16:37:46 UTC (rev 119662)
+++ grokcore.rest/trunk/src/grokcore/rest/configure.zcml 2011-01-18 16:45:38 UTC (rev 119663)
@@ -23,20 +23,4 @@
<grok:grok package=".rest" />
- <!--
- XXX temporary registrations copied from zope.app.http.exception;
- awaiting a [zope|grokcore].errorview package.
- -->
- <browser:defaultView
- for="zope.security.interfaces.IUnauthorized"
- layer="zope.publisher.interfaces.http.IHTTPRequest"
- name="index.html"
- />
-
- <browser:defaultView
- for="zope.publisher.interfaces.http.IMethodNotAllowed"
- layer="zope.publisher.interfaces.http.IHTTPRequest"
- name="index.html"
- />
-
</configure>
Modified: grokcore.rest/trunk/src/grokcore/rest/ftesting.zcml
===================================================================
--- grokcore.rest/trunk/src/grokcore/rest/ftesting.zcml 2011-01-18 16:37:46 UTC (rev 119662)
+++ grokcore.rest/trunk/src/grokcore/rest/ftesting.zcml 2011-01-18 16:45:38 UTC (rev 119663)
@@ -7,11 +7,12 @@
<include package="zope.securitypolicy" />
<include package="zope.annotation" />
+ <include package="zope.errorview" file="errorview.zcml" />
<include package="grokcore.view" file="ftesting.zcml" />
<include package="grokcore.view" file="publication_security.zcml" />
+
<include package="grokcore.rest" />
- <browser:defaultView name="index.html" />
<grok:grok package=".ftests" />
</configure>
Modified: grokcore.rest/trunk/src/grokcore/rest/ftests/rest/rest.py
===================================================================
--- grokcore.rest/trunk/src/grokcore/rest/ftests/rest/rest.py 2011-01-18 16:37:46 UTC (rev 119662)
+++ grokcore.rest/trunk/src/grokcore/rest/ftests/rest/rest.py 2011-01-18 16:45:38 UTC (rev 119663)
@@ -173,44 +173,20 @@
POST, PUT and DELETE however are not public::
- >>> print http('POST /++rest++e/app/alpha HTTP/1.1', handle_errors=False)
- Traceback (most recent call last):
- ...
- Unauthorized: (<grokcore.rest.meta.SecurityRest object at 0x...>,
- '__call__', 'zope.ManageContent')
-
- XXX handle_errors should be set to True once we have a
- [zope|grokcore].errorview package.
-
+ >>> print http('POST /++rest++e/app/alpha HTTP/1.1')
HTTP/1.0 401 Unauthorized
Content-Length: 0
Content-Type: text/plain
WWW-Authenticate: basic realm="Zope"
<BLANKLINE>
- >>> print http('PUT /++rest++e/app/alpha HTTP/1.1', handle_errors=False)
- Traceback (most recent call last):
- ...
- Unauthorized: (<grokcore.rest.meta.SecurityRest object at 0x...>,
- '__call__', 'zope.ManageContent')
-
- XXX handle_errors should be set to True once we have a
- [zope|grokcore].errorview package.
-
+ >>> print http('PUT /++rest++e/app/alpha HTTP/1.1')
HTTP/1.0 401 Unauthorized
Content-Length: 0
WWW-Authenticate: basic realm="Zope"
<BLANKLINE>
- >>> print http('DELETE /++rest++e/app/alpha HTTP/1.1', handle_errors=False)
- Traceback (most recent call last):
- ...
- Unauthorized: (<grokcore.rest.meta.SecurityRest object at 0x...>,
- '__call__', 'zope.ManageContent')
-
- XXX handle_errors should be set to True once we have a
- [zope|grokcore].errorview package.
-
+ >>> print http('DELETE /++rest++e/app/alpha HTTP/1.1')
HTTP/1.0 401 Unauthorized
Content-Length: 0
WWW-Authenticate: basic realm="Zope"
@@ -258,15 +234,7 @@
We shouldn't be allowed to PUT either::
- >>> print http('PUT /app/beta HTTP/1.1', handle_errors=False)
- Traceback (most recent call last):
- ...
- NotFound: Object: <grokcore.rest.ftests.rest.rest.MyApp object at 0x...>,
- name: u'beta'
-
- XXX handle_errors should be set to True once we have a
- [zope|grokcore].errorview package.
-
+ >>> print http('PUT /app/beta HTTP/1.1')
HTTP/1.0 404 Not Found
Content-Length: 0
Modified: grokcore.rest/trunk/src/grokcore/rest/meta.zcml
===================================================================
--- grokcore.rest/trunk/src/grokcore/rest/meta.zcml 2011-01-18 16:37:46 UTC (rev 119662)
+++ grokcore.rest/trunk/src/grokcore/rest/meta.zcml 2011-01-18 16:45:38 UTC (rev 119663)
@@ -1,7 +1,7 @@
<configure
- xmlns="http://namespaces.zope.org/zope"
- xmlns:meta="http://namespaces.zope.org/meta"
- xmlns:grok="http://namespaces.zope.org/grok">
+ xmlns="http://namespaces.zope.org/zope"
+ xmlns:meta="http://namespaces.zope.org/meta"
+ xmlns:grok="http://namespaces.zope.org/grok">
<!-- Load the grokkers -->
<include package="grokcore.component" file="meta.zcml" />
@@ -9,6 +9,7 @@
<include package="grokcore.view" file="publication_security.zcml" />
<include package="grokcore.security" file="meta.zcml" />
<include package="grokcore.traverser" file="configure.zcml"/>
+
<grok:grok package=".meta" />
</configure>
More information about the checkins
mailing list