[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ reverted
-r39882:39761:
Yvo Schubbe
y.2006_ at wcm-solutions.de
Thu Jun 22 07:22:35 EDT 2006
Log message for revision 68786:
reverted -r39882:39761:
- removed deprecation warnings added in Zope 2.8.5 (the warning period starts in Zope 2.9.0)
Changed:
U Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
U Zope/branches/Zope-2_8-branch/lib/python/OFS/Application.py
-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===================================================================
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt 2006-06-21 22:26:01 UTC (rev 68785)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt 2006-06-22 11:22:33 UTC (rev 68786)
@@ -18,6 +18,9 @@
Bugs fixed
+ - OFS Application: Removed deprecation warnings added in Zope 2.8.5.
+ The warning period starts in Zope 2.9.0.
+
- Collector #2136: Map ResourceLockedError to the correct response code.
- Collector #2016: DemoStorage couldn't wrap base storages without
Modified: Zope/branches/Zope-2_8-branch/lib/python/OFS/Application.py
===================================================================
--- Zope/branches/Zope-2_8-branch/lib/python/OFS/Application.py 2006-06-21 22:26:01 UTC (rev 68785)
+++ Zope/branches/Zope-2_8-branch/lib/python/OFS/Application.py 2006-06-22 11:22:33 UTC (rev 68786)
@@ -7,7 +7,7 @@
# 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.
+# FOR A PARTICULAR PURPOSE
#
##############################################################################
"""Application support
@@ -18,9 +18,8 @@
import os, sys, traceback
from cgi import escape
from StringIO import StringIO
-from warnings import warn
-import Globals, Products, App.Product, App.ProductRegistry
+import Globals, Products, App.Product, App.ProductRegistry, misc_
import transaction
from AccessControl.User import UserFolder
from Acquisition import aq_base
@@ -30,17 +29,15 @@
from App.ProductContext import ProductContext
from DateTime import DateTime
from HelpSys.HelpSys import HelpSys
+from misc_ import Misc_
from webdav.NullResource import NullResource
from zExceptions import Redirect as RedirectException, Forbidden
from zLOG import LOG, ERROR, WARNING, INFO
import Folder
-import misc_
import ZDOM
from FindSupport import FindSupport
-from misc_ import Misc_
-
class Application(Globals.ApplicationDefaultPermissions,
ZDOM.Root, Folder.Folder,
App.ProductRegistry.ProductRegistry, FindSupport):
@@ -404,7 +401,7 @@
default_period_secs = 20
default_timeout_mins = 20
- limit = getattr(config, 'maximum_number_of_session_objects',
+ limit = getattr(config, 'maximum_number_of_session_objects',
default_limit)
timeout_spec = getattr(config, 'session_timeout_minutes',
default_timeout_mins)
@@ -731,6 +728,7 @@
path_join=os.path.join
isdir=os.path.isdir
exists=os.path.exists
+ DictType=type({})
global_dict=globals()
silly=('__doc__',)
@@ -751,7 +749,7 @@
# like icon images.
misc_=pgetattr(product, 'misc_', {})
if misc_:
- if isinstance(misc_, dict):
+ if type(misc_) is DictType:
misc_=Misc_(product_name, misc_)
Application.misc_.__dict__[product_name]=misc_
@@ -779,13 +777,6 @@
# constructors, etc.
permissions={}
new_permissions={}
- if pgetattr(product, '__ac_permissions__', None) is not None:
- warn('__init__.py of %s has a long deprecated '
- '\'__ac_permissions__\' attribute. '
- '\'__ac_permissions__\' will be ignored by '
- 'install_product in Zope 2.10. Please use registerClass '
- 'instead.' % product.__name__,
- DeprecationWarning)
for p in pgetattr(product, '__ac_permissions__', ()):
permission, names, default = (
tuple(p)+('Manager',))[:3]
@@ -795,12 +786,6 @@
elif not folder_permissions.has_key(permission):
new_permissions[permission]=()
- if pgetattr(product, 'meta_types', None) is not None:
- warn('__init__.py of %s has a long deprecated \'meta_types\' '
- 'attribute. \'meta_types\' will be ignored by '
- 'install_product in Zope 2.10. Please use registerClass '
- 'instead.' % product.__name__,
- DeprecationWarning)
for meta_type in pgetattr(product, 'meta_types', ()):
# Modern product initialization via a ProductContext
# adds 'product' and 'permission' keys to the meta_type
@@ -812,12 +797,6 @@
meta_type['visibility'] = 'Global'
meta_types.append(meta_type)
- if pgetattr(product, 'methods', None) is not None:
- warn('__init__.py of %s has a long deprecated \'methods\' '
- 'attribute. \'methods\' will be ignored by '
- 'install_product in Zope 2.10. Please use registerClass '
- 'instead.' % product.__name__,
- DeprecationWarning)
for name,method in pgetattr(
product, 'methods', {}).items():
if not hasattr(Folder.Folder, name):
More information about the Zope-Checkins
mailing list