Commit b7daa4bf authored by Jérome Perrin's avatar Jérome Perrin

*: import InitializeClass from AccessControl

We were importing from an old alias in App.class_init, but this module
has been removed from Zope5
parent 91cc6c4e
......@@ -31,12 +31,9 @@
from ERP5Type.Globals instead of Globals
"""
# Globals.InitializeClass a.k.a. default__class_init__. This import location
# has not changed since 2.8 and still works on 2.12
from App.class_init import default__class_init__, ApplicationDefaultPermissions
# Nicer alias for class initializer.
InitializeClass = default__class_init__
# This is a re-export, some custom classes import from here
from AccessControl.class_init import InitializeClass
from zope.globalrequest import getRequest as get_request
......
......@@ -26,7 +26,7 @@ when ERP5 runs in "require_referer" mode.
"""
from AccessControl.SecurityInfo import ClassSecurityInfo
from App.class_init import InitializeClass
from AccessControl.class_init import InitializeClass
from Products.CMFCore.CookieCrumbler import CookieCrumbler
from Products.CMFCore.CookieCrumbler import CookieCrumblerDisabled
from six.moves.urllib.parse import quote, unquote
......
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from AccessControl import ClassSecurityInfo
try:
......
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import six
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
import Acquisition
from Persistence import Persistent
from App.special_dtml import DTMLFile
......
......@@ -2,7 +2,7 @@ from __future__ import absolute_import
import six
import AccessControl
import OFS
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from Acquisition import aq_base
from App.special_dtml import DTMLFile
from Persistence import Persistent
......
......@@ -10,7 +10,7 @@ from __future__ import absolute_import
import string
from AccessControl import ClassSecurityInfo
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
import FormValidationError, BasicForm
from . import StandardFields
......
......@@ -13,7 +13,7 @@
##############################################################################
from AccessControl.SecurityInfo import ClassSecurityInfo
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from Products.HBTreeFolder2.HBTreeFolder2 import HBTreeFolder2Base
from Products.CMFCore.PortalFolder import PortalFolderBase
......
......@@ -24,7 +24,7 @@ from six.moves.urllib.parse import quote
from random import randint
from six.moves import xrange
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from App.special_dtml import DTMLFile
from Persistence import Persistent, PersistentMapping
from Acquisition import aq_base
......
......@@ -22,7 +22,7 @@ from six.moves.urllib.parse import urlparse
from .itools.i18n import get_language_name, get_languages
# Import from Zope
from App.class_init import InitializeClass
from AccessControl.class_init import InitializeClass
from App.Management import Tabs
from AccessControl import ClassSecurityInfo
......
......@@ -22,7 +22,7 @@ from contextlib import contextmanager
# Import from Zope
from AccessControl import ClassSecurityInfo
from Acquisition import aq_parent
from App.class_init import InitializeClass
from AccessControl.class_init import InitializeClass
from OFS.Folder import Folder
from zLOG import LOG, ERROR, INFO, PROBLEM
from zope.interface import implementer
......
......@@ -42,7 +42,7 @@ import polib
# Import from Zope
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from App.class_init import InitializeClass
from AccessControl.class_init import InitializeClass
from App.Dialogs import MessageDialog
from OFS.ObjectManager import ObjectManager
from OFS.SimpleItem import SimpleItem
......
......@@ -16,7 +16,7 @@ from six.moves.email_mime_multipart import MIMEMultipart
from six.moves.email_mime_text import MIMEText
from email.utils import make_msgid, formataddr, getaddresses
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from App.Common import package_home
from .MTMultipart import MTMultipart
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
......
......@@ -7,7 +7,7 @@ from __future__ import absolute_import
from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from Products.CMFCore.FSPageTemplate import FSPageTemplate
from Products.CMFCore.DirectoryView import registerFileExtension
from Products.CMFCore.DirectoryView import registerMetaType
......
......@@ -11,7 +11,7 @@ except ImportError: # six.PY3
from email.encoders import encode_base64
from six.moves.email_mime_base import MIMEBase
from six.moves.email_mime_multipart import MIMEMultipart
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
try:
from OFS.content_types import guess_content_type
except ImportError:
......
......@@ -10,7 +10,7 @@ import six
from AccessControl import ClassSecurityInfo
from AccessControl import getSecurityManager
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from App.Common import package_home
from Products.PageTemplates.ZopePageTemplate import ZopePageTemplate
from Products.PageTemplates.PageTemplate import PageTemplate
......
......@@ -24,7 +24,7 @@ else:
from Products.CMFCore.DirectoryView import addDirectoryViews
from Products.CMFCore.tests.base.testcase import FSDVTest
from AccessControl import ClassSecurityInfo
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
class DummyMember:
......
......@@ -5,7 +5,7 @@ from six.moves import UserDict
from zope.interface import implementer
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from Persistence import PersistentMapping
from persistent.list import PersistentList
from OFS.SimpleItem import SimpleItem
......
......@@ -6,7 +6,7 @@ from zope.interface import implementer
from AccessControl import ClassSecurityInfo
from Acquisition import aq_base
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from OFS.Folder import Folder
from Persistence import PersistentMapping
from Products.CMFCore.ActionProviderBase import ActionProviderBase
......
......@@ -2,7 +2,7 @@ from zope.interface import implementer
from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Persistence import Persistent
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from Acquisition import Implicit
from OFS.SimpleItem import Item
from OFS.role import RoleManager
......
......@@ -5,7 +5,7 @@ __version__ = '$Revision: 1.3 $'[11:-2]
import sys, time, threading
from DateTime import DateTime
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from OFS.SimpleItem import SimpleItem
from OFS.PropertyManager import PropertyManager
......
......@@ -21,7 +21,7 @@ from Persistence import Persistent, PersistentMapping
import Acquisition
import ExtensionClass
import OFS.History
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from App.special_dtml import DTMLFile
from _thread import allocate_lock, get_ident
from OFS.Folder import Folder
......
......@@ -19,7 +19,7 @@ from Products.ERP5Type.Utils import ensure_list
from App.special_dtml import DTMLFile
from App.Dialogs import MessageDialog
from App.class_init import default__class_init__ as InitializeClass
from AccessControl.class_init import InitializeClass
from OFS.Folder import Folder
from DateTime import DateTime
......
......@@ -18,7 +18,7 @@ import six
from zope.interface import implementer
from AccessControl.SecurityInfo import ClassSecurityInfo
from App.class_init import InitializeClass
from AccessControl.class_init import InitializeClass
from App.Common import package_home
from App.config import getConfiguration
from App.ImageFile import ImageFile
......
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