[Zope3-checkins] CVS: Zope3/src/zope/app - _app.py:1.1.2.3 attributeannotations.py:1.1.2.3 content_types.py:1.1.2.2 dependable.py:1.1.2.3 package_home.py:1.1.2.2
Tim Peters
tim.one@comcast.net
Tue, 24 Dec 2002 21:21:39 -0500
Update of /cvs-repository/Zope3/src/zope/app
In directory cvs.zope.org:/tmp/cvs-serv19240/src/zope/app
Modified Files:
Tag: NameGeddon-branch
_app.py attributeannotations.py content_types.py dependable.py
package_home.py
Log Message:
Whitespace normalization, via Python's Tools/scripts/reindent.py. The
files are fixed-points of that script now. Fixed a few cases where
code relied on significant trailing whitespace (ouch).
=== Zope3/src/zope/app/_app.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/_app.py:1.1.2.2 Tue Dec 24 07:50:44 2002
+++ Zope3/src/zope/app/_app.py Tue Dec 24 21:20:07 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""Code to initialize the application server
@@ -123,7 +123,7 @@
class BrowserPublication(DebugPublication, BrowserPublication):
pass
-
+
self.__TestRequest = TestRequest
self.__browser_pub = BrowserPublication(self.db)
@@ -135,7 +135,7 @@
return request
def publish(self, path='/', stdin='', stdout=None, *args, **kw):
-
+
if stdout is None:
stdout = StringIO()
@@ -149,7 +149,7 @@
_publish(request, handle_errors = 0)
def debug(self, *args, **kw):
-
+
import pdb
class Pdb(pdb.Pdb):
=== Zope3/src/zope/app/attributeannotations.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/attributeannotations.py:1.1.2.2 Mon Dec 23 18:52:27 2002
+++ Zope3/src/zope/app/attributeannotations.py Tue Dec 24 21:20:07 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
@@ -26,7 +26,7 @@
Store annotations in the __annotations__ attribute on a
IAttributeAnnotatable object.
"""
-
+
__implements__ = IAnnotations
def __init__(self, obj):
@@ -34,14 +34,14 @@
# for now, we'll leave it to users of annotations to do that.
# Users of annotations will typically need to do their own
# unwrapping anyway.
-
+
self.wrapped_obj = obj
self.unwrapped_obj = removeAllProxies(obj)
-
+
def __getitem__(self, key):
annotations = getattr(self.unwrapped_obj, '__annotations__', {})
return ContextWrapper(annotations[key], self.wrapped_obj)
-
+
def get(self, key, default=None):
try:
value = self.unwrapped_obj.__annotations__.get(key, default)
=== Zope3/src/zope/app/content_types.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/content_types.py:1.1.2.1 Mon Dec 23 14:30:56 2002
+++ Zope3/src/zope/app/content_types.py Tue Dec 24 21:20:07 2002
@@ -1,14 +1,14 @@
##############################################################################
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE
-#
+#
##############################################################################
"""A utility module for content-type handling."""
__version__='$Revision$'[11:-2]
@@ -86,15 +86,14 @@
if find_binary(body) is not None:
type = default or 'application/octet-stream'
else:
- type = (default or text_type(body)
+ type = (default or text_type(body)
or 'text/x-unknown-content-type')
else:
- type = default or 'text/x-unknown-content-type'
-
+ type = default or 'text/x-unknown-content-type'
+
return type.lower(), enc and enc.lower() or None
if __name__=='__main__':
items=mimetypes.types_map.items()
items.sort()
for item in items: print "%s:\t%s" % item
-
=== Zope3/src/zope/app/dependable.py 1.1.2.2 => 1.1.2.3 ===
--- Zope3/src/zope/app/dependable.py:1.1.2.2 Tue Dec 24 07:50:44 2002
+++ Zope3/src/zope/app/dependable.py Tue Dec 24 21:20:07 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""
$Id$
@@ -31,7 +31,7 @@
def __init__(self, context):
self.context = context
-
+
def addDependent(self, location):
"See IDependable"
=== Zope3/src/zope/app/package_home.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/app/package_home.py:1.1.2.1 Mon Dec 23 14:30:56 2002
+++ Zope3/src/zope/app/package_home.py Tue Dec 24 21:20:07 2002
@@ -2,14 +2,14 @@
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
-#
+#
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
-#
+#
##############################################################################
"""Function for deducing a package file-system location from global data
@@ -21,4 +21,3 @@
def package_home(gdict):
filename = gdict["__file__"]
return os.path.dirname(filename)
-