[Zope3-checkins] SVN: Zope3/trunk/src/z More whitespace and ReST style cleanup.

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Oct 30 20:13:10 EST 2005


Log message for revision 39757:
  More whitespace and ReST style cleanup.
  

Changed:
  U   Zope3/trunk/src/zope/app/authentication/browser/groupfolder.txt
  U   Zope3/trunk/src/zope/app/authentication/browser/pau_prefix_and_searching.txt
  U   Zope3/trunk/src/zope/app/basicskin/view_macros.pt
  U   Zope3/trunk/src/zope/app/container/browser/contents.py
  U   Zope3/trunk/src/zope/app/css/TODO.txt
  U   Zope3/trunk/src/zope/app/homefolder/configure.zcml
  U   Zope3/trunk/src/zope/app/homefolder/homefolder.py
  U   Zope3/trunk/src/zope/app/workflow/stateful/testobject.zcml
  U   Zope3/trunk/src/zope/app/wsgi/__init__.py
  U   Zope3/trunk/src/zope/app/zptpage/browser/collector269.txt
  U   Zope3/trunk/src/zope/configuration/config.py
  U   Zope3/trunk/src/zwiki/browser/skin/configure.zcml

-=-
Modified: Zope3/trunk/src/zope/app/authentication/browser/groupfolder.txt
===================================================================
--- Zope3/trunk/src/zope/app/authentication/browser/groupfolder.txt	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/authentication/browser/groupfolder.txt	2005-10-31 01:13:10 UTC (rev 39757)
@@ -735,6 +735,7 @@
 
 Finally we'll get Betty and see that she is in the admin and
 power-user groups:
+
   >>> betty = principals.getPrincipal(u'users3')
   >>> betty.groups.sort()
   >>> betty.groups

Modified: Zope3/trunk/src/zope/app/authentication/browser/pau_prefix_and_searching.txt
===================================================================
--- Zope3/trunk/src/zope/app/authentication/browser/pau_prefix_and_searching.txt	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/authentication/browser/pau_prefix_and_searching.txt	2005-10-31 01:13:10 UTC (rev 39757)
@@ -5,7 +5,7 @@
 This test confirms that both principals and groups can be searched for in
 PAUs that have prefixes.
 
-First we'll create a PAU with a prefix of 'pau1_' and and register:
+First we'll create a PAU with a prefix of `pau1_` and and register:
 
   >>> print http(r"""
   ... POST /++etc++site/default/+/AddPluggableAuthentication.html%3D HTTP/1.1
@@ -328,7 +328,7 @@
   ... Authorization: Basic bWdyOm1ncnB3
   ... Content-Length: 255
   ... Content-Type: application/x-www-form-urlencoded
-  ... 
+  ...
   ... field.principal.displayed=y&"""
   ... "field.principal.MC5Hcm91cHM_.field.search=&"
   ... "field.principal.MC5Hcm91cHM_.selection=cGF1MV9ncm91cHNfbmljZQ__&"

Modified: Zope3/trunk/src/zope/app/basicskin/view_macros.pt
===================================================================
--- Zope3/trunk/src/zope/app/basicskin/view_macros.pt	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/basicskin/view_macros.pt	2005-10-31 01:13:10 UTC (rev 39757)
@@ -2,7 +2,7 @@
          "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html metal:define-macro="page" i18n:domain="zope">
 <head metal:define-macro="head">
-  <title 
+  <title
     metal:define-slot="title"
     tal:content="options/getTitle|view/getTitle|context/getTitle|default"
     >Zope</title>
@@ -31,7 +31,7 @@
   </div>
 
   <div metal:define-macro="logged_user">
-  <p i18n:translate="">User: 
+  <p i18n:translate="">User:
     <span tal:replace="request/principal/title"
           i18n:name="user_title">User</span>
   </p>

Modified: Zope3/trunk/src/zope/app/container/browser/contents.py
===================================================================
--- Zope3/trunk/src/zope/app/container/browser/contents.py	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/container/browser/contents.py	2005-10-31 01:13:10 UTC (rev 39757)
@@ -393,7 +393,7 @@
                     raise
 
             if duplicated_id:
-                not_pasteable_ids.append(zapi.getName(obj))                
+                not_pasteable_ids.append(zapi.getName(obj))
 
         if moved:
             # Clear the clipboard if we do a move, but not if we only do a copy
@@ -409,8 +409,8 @@
                 str(not_pasteable_ids))))
 
     def hasClipboardContents(self):
-        """ interogates the `PrinicipalAnnotation` to see if
-           clipboard contents exist """
+        """Interogate the ``PrinicipalAnnotation`` to see if clipboard
+        contents exist."""
 
         if not self.supportsPaste:
             return False

Modified: Zope3/trunk/src/zope/app/css/TODO.txt
===================================================================
--- Zope3/trunk/src/zope/app/css/TODO.txt	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/css/TODO.txt	2005-10-31 01:13:10 UTC (rev 39757)
@@ -2,18 +2,18 @@
 TODO
 ====
 
-- Decide where we should place the style guide. I think the source zope.app 
+- Decide where we should place the style guide. I think the source `zope.app`
   is the right place, because we can include it in the onlinehelp.
-  
+
 - Chechout if the online help works and include it in a own section
-  like 'skins.???'
+  like `skins.???`
 
 - Remove CSS test skin
 
   Test skin "CSS" (just for prototyping) is located in src.css.browser
   You can call it like::
 
-  http://localhost:8080/++skin++CSS
+    http://localhost:8080/++skin++CSS
 
   I've added a temporary test skin "CSS" in ./skin. We will remove it
   after defining the style sheet. The new style sheet will be used in the
@@ -22,14 +22,14 @@
   The default (Rotterdam) skin should use the zope3.css file in this
   package. This way we can support one place where we have to update.
 
-  That's also the reason why this pakage is here and not in the 
+  That's also the reason why this pakage is here and not in the
   zope.doc.
 
 - Search for used styles and add it to the following files:
 
   o samples.html
   o zope3.css
-  
+
   We can copy paste it form the rotterdam skin. But check each
   css tag. Perhaps we have obsolate tags in the rotterdam css
   since we never did take care on it

Modified: Zope3/trunk/src/zope/app/homefolder/configure.zcml
===================================================================
--- Zope3/trunk/src/zope/app/homefolder/configure.zcml	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/homefolder/configure.zcml	2005-10-31 01:13:10 UTC (rev 39757)
@@ -10,12 +10,12 @@
       factory=".homefolder.HomeFolder"
       />
 
-  <adapter 
+  <adapter
       for="zope.security.interfaces.IPrincipal"
-      provides="zope.app.traversing.interfaces.IPathAdapter" 
-      factory=".homefolder.getHomeFolder" 
+      provides="zope.app.traversing.interfaces.IPathAdapter"
+      factory=".homefolder.getHomeFolder"
       name="homefolder" />
- 
+
   <localUtility class=".homefolder.HomeFolderManager">
 
     <require
@@ -38,12 +38,12 @@
 
     <browser:widget
       field="homeFolderBase"
-      class=".browser.PathWidget" /> 
+      class=".browser.PathWidget" />
 
   </browser:addform>
 
   <browser:addMenuItem
-      title="Home Folder Manager" 
+      title="Home Folder Manager"
       class=".homefolder.HomeFolderManager"
       permission="zope.ManageServices"
       view="AddHomeFolderManagerForm.html"
@@ -58,7 +58,7 @@
 
     <browser:widget
       field="homeFolderBase"
-      class=".browser.PathWidget" /> 
+      class=".browser.PathWidget" />
 
   </browser:editform>
 

Modified: Zope3/trunk/src/zope/app/homefolder/homefolder.py
===================================================================
--- Zope3/trunk/src/zope/app/homefolder/homefolder.py	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/homefolder/homefolder.py	2005-10-31 01:13:10 UTC (rev 39757)
@@ -73,7 +73,7 @@
                 self.assignHomeFolder(principalId, create=True)
             else:
                 return None
-        
+
         return self.homeFolderBase.get(self.assignments[principalId], None)
 
 

Modified: Zope3/trunk/src/zope/app/workflow/stateful/testobject.zcml
===================================================================
--- Zope3/trunk/src/zope/app/workflow/stateful/testobject.zcml	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/workflow/stateful/testobject.zcml	2005-10-31 01:13:10 UTC (rev 39757)
@@ -13,7 +13,6 @@
 
     <factory
         id="zope.app.workflow.TestObject"
-        permission="zope.ManageContent"
         title="Test Object"
         description="Test Object" />
 

Modified: Zope3/trunk/src/zope/app/wsgi/__init__.py
===================================================================
--- Zope3/trunk/src/zope/app/wsgi/__init__.py	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/wsgi/__init__.py	2005-10-31 01:13:10 UTC (rev 39757)
@@ -61,6 +61,29 @@
         return response.consumeBodyIter()
 
 
+class PMDBWSGIPublisherApplication(WSGIPublisherApplication):
+
+    def __call__(self, environ, start_response):
+        environ['wsgi.handleErrors'] = False
+
+        # Call the application to handle the request and write a response
+        try:
+            app =  super(PMDBWSGIPublisherApplication, self)
+            return app.__call__(environ, start_response)
+        except Exception, error:
+            import sys, pdb
+            print "%s:" % sys.exc_info()[0]
+            print sys.exc_info()[1]
+            #import zope.security.management
+            #zope.security.management.restoreInteraction()
+            try:
+                pdb.post_mortem(sys.exc_info()[2])
+                raise
+            finally:
+                pass #zope.security.management.endInteraction()
+
+
+
 def getWSGIApplication(configfile, schemafile=None,
                        features=(),
                        requestFactory=HTTPPublicationRequestFactory):

Modified: Zope3/trunk/src/zope/app/zptpage/browser/collector269.txt
===================================================================
--- Zope3/trunk/src/zope/app/zptpage/browser/collector269.txt	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/app/zptpage/browser/collector269.txt	2005-10-31 01:13:10 UTC (rev 39757)
@@ -1,24 +1,29 @@
+=========
+Issue 269
+=========
+
 http://collector.zope.org/Zope3-dev/269
 
-When you use TALES path expressions in a page template that is security proxied, you get ForbiddenAttribute errors for PathExpr methods. Other
-kinds of expressions are probably also affected.
+When you use TALES path expressions in a page template that is security
+proxied, you get ForbiddenAttribute errors for PathExpr methods. Other kinds
+of expressions are probably also affected.
 
 To see the error, apply the following diff to collector266.txt and run
 test.py zope.app.zptpage.browser (I'm too lazy to figure out how to
-demonstrate this problem manually in a web browser):
+demonstrate this problem manually in a web browser)::
 
-Index: src/zope/app/zptpage/browser/collector266.txt
-===================================================================
---- src/zope/app/zptpage/browser/collector266.txt (revision 27388)
-+++ src/zope/app/zptpage/browser/collector266.txt (working copy)
-@@ -29,6 +29,7 @@
-   ... </div>
-   ... <div metal:define-macro="greet">
-   ... Hello <span metal:define-slot="name">world</span>
-+ ... <p tal:condition="nothing">Optional text</p>
-   ... </div>
-   ... </html>
-   ... -----------------------------78336869011025200592044897763
+  Index: src/zope/app/zptpage/browser/collector266.txt
+  ===================================================================
+  --- src/zope/app/zptpage/browser/collector266.txt (revision 27388)
+  +++ src/zope/app/zptpage/browser/collector266.txt (working copy)
+  @@ -29,6 +29,7 @@
+     ... </div>
+     ... <div metal:define-macro="greet">
+     ... Hello <span metal:define-slot="name">world</span>
+  + ... <p tal:condition="nothing">Optional text</p>
+     ... </div>
+     ... </html>
+     ... -----------------------------78336869011025200592044897763
 
 
 We create a page that defines a macro:
@@ -29,10 +34,10 @@
   ... Content-Length: 835
   ... Content-Type: multipart/form-data; boundary=---------------------------78336869011025200592044897763
   ... Referer: http://localhost:8081/+/zope.app.zptpage.ZPTPage=
-  ... 
+  ...
   ... -----------------------------78336869011025200592044897763
   ... Content-Disposition: form-data; name="field.source"
-  ... 
+  ...
   ... <html>
   ... <div metal:define-macro="greet">
   ... Hello <span metal:define-slot="name">world</span>
@@ -47,19 +52,19 @@
   ... </html>
   ... -----------------------------78336869011025200592044897763
   ... Content-Disposition: form-data; name="field.expand.used"
-  ... 
-  ... 
+  ...
+  ...
   ... -----------------------------78336869011025200592044897763
   ... Content-Disposition: form-data; name="field.evaluateInlineCode.used"
-  ... 
-  ... 
+  ...
+  ...
   ... -----------------------------78336869011025200592044897763
   ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
-  ... 
+  ...
   ... Add
   ... -----------------------------78336869011025200592044897763
   ... Content-Disposition: form-data; name="add_input_name"
-  ... 
+  ...
   ... macros
   ... -----------------------------78336869011025200592044897763--
   ... """)
@@ -77,10 +82,10 @@
   ... Content-Length: 1771
   ... Content-Type: multipart/form-data; boundary=---------------------------196751392613651805401540383426
   ... Referer: http://localhost:8081/+/zope.app.zptpage.ZPTPage=
-  ... 
+  ...
   ... -----------------------------196751392613651805401540383426
   ... Content-Disposition: form-data; name="field.source"
-  ... 
+  ...
   ... <html>
   ... <body>
   ... <div metal:use-macro="container/macros/macros/greet">
@@ -90,19 +95,19 @@
   ... </html>
   ... -----------------------------196751392613651805401540383426
   ... Content-Disposition: form-data; name="field.expand.used"
-  ... 
-  ... 
+  ...
+  ...
   ... -----------------------------196751392613651805401540383426
   ... Content-Disposition: form-data; name="field.evaluateInlineCode.used"
-  ... 
-  ... 
+  ...
+  ...
   ... -----------------------------196751392613651805401540383426
   ... Content-Disposition: form-data; name="UPDATE_SUBMIT"
-  ... 
+  ...
   ... Add
   ... -----------------------------196751392613651805401540383426
   ... Content-Disposition: form-data; name="add_input_name"
-  ... 
+  ...
   ... page
   ... -----------------------------196751392613651805401540383426--
   ... """)
@@ -111,7 +116,7 @@
   Location: http://localhost/@@contents.html
   ...
 
-And run it. 
+And run it.
 
   >>> print http(r"""
   ... GET /page HTTP/1.1

Modified: Zope3/trunk/src/zope/configuration/config.py
===================================================================
--- Zope3/trunk/src/zope/configuration/config.py	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zope/configuration/config.py	2005-10-31 01:13:10 UTC (rev 39757)
@@ -371,7 +371,7 @@
 
         Finally, we can add an order argument to crudely control the order
         of execution:
-        
+
         >>> c.action(None, order=99999)
         >>> c.actions[-1]
         (None, None, (), {}, ('foo.zcml',), '?', 99999)

Modified: Zope3/trunk/src/zwiki/browser/skin/configure.zcml
===================================================================
--- Zope3/trunk/src/zwiki/browser/skin/configure.zcml	2005-10-31 01:06:43 UTC (rev 39756)
+++ Zope3/trunk/src/zwiki/browser/skin/configure.zcml	2005-10-31 01:13:10 UTC (rev 39757)
@@ -6,15 +6,15 @@
 <browser:layer name="wiki" />
 <browser:skin name="wiki" layers="wiki zope.app.rotterdam.rotterdam default" />
 
-<browser:resource 
+<browser:resource
     name="wiki.css" file="wiki.css" layer="wiki" />
 
-<browser:page 
+<browser:page
     for="*"
     name="skin_macros"
     permission="zope.View"
     layer="wiki"
-    template="template.pt" 
+    template="template.pt"
     />
 
 <browser:page



More information about the Zope3-Checkins mailing list