[Zope-Checkins] SVN: Zope/branches/2.10/ - added 'InitializeClass' alias to ease migration
Yvo Schubbe
y.2009 at wcm-solutions.de
Sat Jan 3 10:54:16 EST 2009
Log message for revision 94482:
- added 'InitializeClass' alias to ease migration
Changed:
U Zope/branches/2.10/doc/CHANGES.txt
U Zope/branches/2.10/lib/python/App/class_init.py
U Zope/branches/2.10/lib/python/Globals/__init__.py
-=-
Modified: Zope/branches/2.10/doc/CHANGES.txt
===================================================================
--- Zope/branches/2.10/doc/CHANGES.txt 2009-01-03 15:47:11 UTC (rev 94481)
+++ Zope/branches/2.10/doc/CHANGES.txt 2009-01-03 15:54:16 UTC (rev 94482)
@@ -8,7 +8,11 @@
Restructuring
- - Moved 'ApplicationDefaultPermissiosn' from 'App.class_init' to
+ - Added 'InitializeClass' alias in 'App.class_init' to ease migration.
+ In Zope 2.12 it will be recommended to import 'InitializeClass' from
+ 'App.class_init' instead of 'Globals'.
+
+ - Moved 'ApplicationDefaultPermissions' from 'App.class_init' to
'AccessControl.Permissions', in order to break an import cycle
in third-party code which avoids imports from 'Globals.' Left
the class importable from its old location without deprecation.
Modified: Zope/branches/2.10/lib/python/App/class_init.py
===================================================================
--- Zope/branches/2.10/lib/python/App/class_init.py 2009-01-03 15:47:11 UTC (rev 94481)
+++ Zope/branches/2.10/lib/python/App/class_init.py 2009-01-03 15:54:16 UTC (rev 94482)
@@ -79,3 +79,5 @@
"Class %s.%s has a security declaration for "
"nonexistent method %r", self.__module__,
self.__name__, mname)
+
+InitializeClass = default__class_init__ # future name
Modified: Zope/branches/2.10/lib/python/Globals/__init__.py
===================================================================
--- Zope/branches/2.10/lib/python/Globals/__init__.py 2009-01-03 15:47:11 UTC (rev 94481)
+++ Zope/branches/2.10/lib/python/Globals/__init__.py 2009-01-03 15:54:16 UTC (rev 94482)
@@ -27,11 +27,7 @@
from App.Common import package_home, attrget, Dictionary
from App.config import getConfiguration as _getConfiguration
from Persistence import Persistent, PersistentMapping
-from App.class_init import default__class_init__
-
-# Nicer alias for class initializer.
-InitializeClass = default__class_init__
-
+from App.class_init import InitializeClass, default__class_init__
from App.special_dtml import HTML, HTMLFile, DTMLFile
from App.Dialogs import MessageDialog
from App.ImageFile import ImageFile
More information about the Zope-Checkins
mailing list