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