Commit 546f3456 authored by 's avatar

reverted -r39882:39761:

- removed deprecation warnings added in Zope 2.8.5 (the warning period starts in Zope 2.9.0)
parent c996feb2
......@@ -18,6 +18,9 @@ Zope Changes
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
......
......@@ -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 @@ $Id$
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,16 +29,14 @@ from App.Product import doInstall
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,
......@@ -404,7 +401,7 @@ class AppInitializer:
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 @@ def install_product(app, product_dir, product_name, meta_types,
path_join=os.path.join
isdir=os.path.isdir
exists=os.path.exists
DictType=type({})
global_dict=globals()
silly=('__doc__',)
......@@ -751,7 +749,7 @@ def install_product(app, product_dir, product_name, meta_types,
# 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 @@ def install_product(app, product_dir, product_name, meta_types,
# 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 @@ def install_product(app, product_dir, product_name, meta_types,
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 @@ def install_product(app, product_dir, product_name, meta_types,
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):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment