[Checkins] SVN: z3c.authentication.simple/trunk/src/z3c/ Use newest style in namespace __init__ files

Roger Ineichen roger at projekt01.ch
Sat Mar 15 20:32:36 EDT 2008


Log message for revision 84691:
  Use newest style in namespace __init__ files

Changed:
  U   z3c.authentication.simple/trunk/src/z3c/__init__.py
  U   z3c.authentication.simple/trunk/src/z3c/authentication/__init__.py

-=-
Modified: z3c.authentication.simple/trunk/src/z3c/__init__.py
===================================================================
--- z3c.authentication.simple/trunk/src/z3c/__init__.py	2008-03-16 00:31:07 UTC (rev 84690)
+++ z3c.authentication.simple/trunk/src/z3c/__init__.py	2008-03-16 00:32:35 UTC (rev 84691)
@@ -1,22 +1,7 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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$
-"""
+# this is a namespace package
 try:
-    # Declare this a namespace package if pkg_resources is available.
     import pkg_resources
-    pkg_resources.declare_namespace('z3c')
+    pkg_resources.declare_namespace(__name__)
 except ImportError:
-    pass
+    import pkgutil
+    __path__ = pkgutil.extend_path(__path__, __name__)

Modified: z3c.authentication.simple/trunk/src/z3c/authentication/__init__.py
===================================================================
--- z3c.authentication.simple/trunk/src/z3c/authentication/__init__.py	2008-03-16 00:31:07 UTC (rev 84690)
+++ z3c.authentication.simple/trunk/src/z3c/authentication/__init__.py	2008-03-16 00:32:35 UTC (rev 84691)
@@ -1,16 +1,7 @@
-##############################################################################
-#
-# Copyright (c) 2006 Zope Foundation and Contributors.
-# All Rights Reserved.
-#
-# This software is subject to the provisions of the Zope Public License,
-# Version 2.1 (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$
-"""
+# this is a namespace package
+try:
+    import pkg_resources
+    pkg_resources.declare_namespace(__name__)
+except ImportError:
+    import pkgutil
+    __path__ = pkgutil.extend_path(__path__, __name__)



More information about the Checkins mailing list