Commit 6bca5348 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

rewrite deprecated imports that will be removed in the future.

parent 48a82c22
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
############################################################################## ##############################################################################
import zope.interface import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.AuthEncoding import pw_encrypt, pw_validate from AuthEncoding.AuthEncoding import pw_encrypt, pw_validate
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
......
...@@ -31,7 +31,7 @@ import zope.interface ...@@ -31,7 +31,7 @@ import zope.interface
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from erp5.component.interface.ILoginAccountProvider import ILoginAccountProvider from erp5.component.interface.ILoginAccountProvider import ILoginAccountProvider
from AccessControl.AuthEncoding import pw_validate from AuthEncoding.AuthEncoding import pw_validate
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
......
...@@ -22,7 +22,7 @@ from erp5.component.document.File import File, _MARKER ...@@ -22,7 +22,7 @@ from erp5.component.document.File import File, _MARKER
from erp5.component.module.BTreeData import BTreeData from erp5.component.module.BTreeData import BTreeData
from ZPublisher.HTTPRequest import FileUpload from ZPublisher.HTTPRequest import FileUpload
from ZPublisher import HTTPRangeSupport from ZPublisher import HTTPRangeSupport
from webdav.common import rfc1123_date from zope.datetime import rfc1123_date
from mimetools import choose_boundary from mimetools import choose_boundary
from Products.CMFCore.utils import _setCacheHeaders, _ViewEmulator from Products.CMFCore.utils import _setCacheHeaders, _ViewEmulator
from DateTime import DateTime from DateTime import DateTime
......
...@@ -30,7 +30,7 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase ...@@ -30,7 +30,7 @@ from Products.ERP5Type.tests.ERP5TypeTestCase import ERP5TypeTestCase
from Products.ERP5Type.UnrestrictedMethod import super_user from Products.ERP5Type.UnrestrictedMethod import super_user
from AccessControl.SecurityManagement import newSecurityManager, \ from AccessControl.SecurityManagement import newSecurityManager, \
getSecurityManager, setSecurityManager getSecurityManager, setSecurityManager
from AccessControl.User import nobody from AccessControl.users import nobody
from AccessControl import Unauthorized from AccessControl import Unauthorized
from DateTime import DateTime from DateTime import DateTime
from erp5.component.module.DateUtils import addToDate from erp5.component.module.DateUtils import addToDate
......
...@@ -18,7 +18,7 @@ import urllib ...@@ -18,7 +18,7 @@ import urllib
from OFS.DTMLMethod import DTMLMethod from OFS.DTMLMethod import DTMLMethod
from OFS.Folder import Folder from OFS.Folder import Folder
from AccessControl.User import UserFolder from AccessControl.users import UserFolder
from Products.CMFCore.CookieCrumbler import CookieCrumbler from Products.CMFCore.CookieCrumbler import CookieCrumbler
from Products.CMFCore.tests.test_CookieCrumbler import makerequest from Products.CMFCore.tests.test_CookieCrumbler import makerequest
......
...@@ -47,7 +47,7 @@ from AccessControl.SecurityManagement import newSecurityManager ...@@ -47,7 +47,7 @@ from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager from AccessControl.SecurityManagement import noSecurityManager
from AccessControl.SecurityManagement import setSecurityManager from AccessControl.SecurityManagement import setSecurityManager
from AccessControl.SecurityManagement import getSecurityManager from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.User import system as system_user from AccessControl.users import system as system_user
from Products.CMFCore.utils import UniqueObject from Products.CMFCore.utils import UniqueObject
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import InitializeClass, DTMLFile
from Acquisition import aq_base, aq_inner, aq_parent from Acquisition import aq_base, aq_inner, aq_parent
......
...@@ -36,7 +36,7 @@ from DateTime import DateTime ...@@ -36,7 +36,7 @@ from DateTime import DateTime
from AccessControl import ClassSecurityInfo, Unauthorized from AccessControl import ClassSecurityInfo, Unauthorized
from AccessControl.SecurityManagement import getSecurityManager, \ from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager, newSecurityManager setSecurityManager, newSecurityManager
from AccessControl.User import nobody from AccessControl.users import nobody
from Products.CMFActivity.ActivityRuntimeEnvironment import getActivityRuntimeEnvironment from Products.CMFActivity.ActivityRuntimeEnvironment import getActivityRuntimeEnvironment
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
......
...@@ -40,7 +40,7 @@ from AccessControl import ClassSecurityInfo, Unauthorized ...@@ -40,7 +40,7 @@ from AccessControl import ClassSecurityInfo, Unauthorized
from AccessControl.SecurityInfo import ModuleSecurityInfo from AccessControl.SecurityInfo import ModuleSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager, \ from AccessControl.SecurityManagement import getSecurityManager, \
newSecurityManager, setSecurityManager newSecurityManager, setSecurityManager
from AccessControl.User import nobody from AccessControl.users import nobody
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.PythonScripts.PythonScript import PythonScript from Products.PythonScripts.PythonScript import PythonScript
from Products.ZSQLMethods.SQL import SQL from Products.ZSQLMethods.SQL import SQL
......
...@@ -34,7 +34,7 @@ import zope.interface ...@@ -34,7 +34,7 @@ import zope.interface
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.SecurityManagement import getSecurityManager, \ from AccessControl.SecurityManagement import getSecurityManager, \
setSecurityManager, newSecurityManager setSecurityManager, newSecurityManager
from AccessControl.User import nobody from AccessControl.users import nobody
from Products.ERP5Type import Permissions, PropertySheet from Products.ERP5Type import Permissions, PropertySheet
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.XMLObject import XMLObject from Products.ERP5Type.XMLObject import XMLObject
......
...@@ -36,7 +36,7 @@ from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog ...@@ -36,7 +36,7 @@ from Products.ZSQLCatalog.ZSQLCatalog import ZCatalog
from Products.ZSQLCatalog.SQLCatalog import ComplexQuery, SimpleQuery from Products.ZSQLCatalog.SQLCatalog import ComplexQuery, SimpleQuery
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from AccessControl import ClassSecurityInfo, getSecurityManager from AccessControl import ClassSecurityInfo, getSecurityManager
from AccessControl.User import system as system_user from AccessControl.users import system as system_user
from Products.CMFCore.utils import UniqueObject, _getAuthenticatedUser, getToolByName from Products.CMFCore.utils import UniqueObject, _getAuthenticatedUser, getToolByName
from Products.ERP5Type.Globals import InitializeClass, DTMLFile from Products.ERP5Type.Globals import InitializeClass, DTMLFile
from Acquisition import aq_base, aq_inner, aq_parent, ImplicitAcquisitionWrapper from Acquisition import aq_base, aq_inner, aq_parent, ImplicitAcquisitionWrapper
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
from functools import partial from functools import partial
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.AuthEncoding import pw_validate from AuthEncoding.AuthEncoding import pw_validate
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.PluggableAuthService.plugins.BasePlugin import BasePlugin from Products.PluggableAuthService.plugins.BasePlugin import BasePlugin
from Products.PluggableAuthService.utils import classImplements from Products.PluggableAuthService.utils import classImplements
......
...@@ -19,7 +19,7 @@ from six import string_types as basestring ...@@ -19,7 +19,7 @@ from six import string_types as basestring
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from AccessControl.SecurityInfo import ModuleSecurityInfo from AccessControl.SecurityInfo import ModuleSecurityInfo
from AccessControl.AuthEncoding import pw_validate from AuthEncoding.AuthEncoding import pw_validate
from Products.PageTemplates.PageTemplateFile import PageTemplateFile from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from Products.PluggableAuthService.PluggableAuthService import \ from Products.PluggableAuthService.PluggableAuthService import \
_SWALLOWABLE_PLUGIN_EXCEPTIONS _SWALLOWABLE_PLUGIN_EXCEPTIONS
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
############################################################################## ##############################################################################
from contextlib import contextmanager from contextlib import contextmanager
from AccessControl.User import UnrestrictedUser from AccessControl.users import UnrestrictedUser
from AccessControl.SpecialUsers import system from AccessControl.SpecialUsers import system
from AccessControl.SecurityManagement import getSecurityManager, \ from AccessControl.SecurityManagement import getSecurityManager, \
newSecurityManager, setSecurityManager newSecurityManager, setSecurityManager
......
import time import time
from Products.StandardCacheManagers.AcceleratedHTTPCacheManager import \ from Products.StandardCacheManagers.AcceleratedHTTPCacheManager import \
AcceleratedHTTPCache, AcceleratedHTTPCacheManager AcceleratedHTTPCache, AcceleratedHTTPCacheManager
from App.Common import rfc1123_date from zope.datetime import rfc1123_date
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from Products.ERP5Type import _dtmldir from Products.ERP5Type import _dtmldir
......
...@@ -2,7 +2,7 @@ from Products.CMFCore.CachingPolicyManager import CachingPolicy, \ ...@@ -2,7 +2,7 @@ from Products.CMFCore.CachingPolicyManager import CachingPolicy, \
CachingPolicyManager, createCPContext CachingPolicyManager, createCPContext
from App.special_dtml import DTMLFile from App.special_dtml import DTMLFile
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
from App.Common import rfc1123_date from zope.datetime import rfc1123_date
from DateTime.DateTime import DateTime from DateTime.DateTime import DateTime
from Products.ERP5Type import _dtmldir from Products.ERP5Type import _dtmldir
......
...@@ -37,7 +37,7 @@ def getRolesInContext(self, object): ...@@ -37,7 +37,7 @@ def getRolesInContext(self, object):
o Include *both* local roles assigned directly to us *and* those o Include *both* local roles assigned directly to us *and* those
assigned to our groups. assigned to our groups.
o Ripped off from AccessControl.User.BasicUser, which provides o Ripped off from AccessControl.users.BasicUser, which provides
no other extension mechanism. :( no other extension mechanism. :(
""" """
principal_id_list = [self.getId()] principal_id_list = [self.getId()]
...@@ -74,7 +74,7 @@ def allowed(self, object, object_roles=None): ...@@ -74,7 +74,7 @@ def allowed(self, object, object_roles=None):
o Include *both* local roles assigned directly to us *and* those o Include *both* local roles assigned directly to us *and* those
assigned to our groups. assigned to our groups.
o Ripped off from AccessControl.User.BasicUser, which provides o Ripped off from AccessControl.users.BasicUser, which provides
no other extension mechanism. :( no other extension mechanism. :(
""" """
if object_roles is _what_not_even_god_should_do: if object_roles is _what_not_even_god_should_do:
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
from threading import local from threading import local
from Acquisition import aq_inner, aq_parent from Acquisition import aq_inner, aq_parent
from AccessControl.User import SimpleUser from AccessControl.users import SimpleUser
from App.config import getConfiguration from App.config import getConfiguration
from ..TransactionalVariable import TransactionalVariable from ..TransactionalVariable import TransactionalVariable
......
...@@ -8,7 +8,7 @@ from __future__ import absolute_import ...@@ -8,7 +8,7 @@ from __future__ import absolute_import
import os import os
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager from AccessControl.SecurityManagement import noSecurityManager
from AccessControl.User import system as SystemUser,SimpleUser from AccessControl.users import system as SystemUser,SimpleUser
from OFS.Folder import Folder from OFS.Folder import Folder
from .test_MailTemplate import DummyMailHost,Zope,get_transaction from .test_MailTemplate import DummyMailHost,Zope,get_transaction
from Testing.makerequest import makerequest from Testing.makerequest import makerequest
......
...@@ -13,7 +13,7 @@ except ImportError: ...@@ -13,7 +13,7 @@ except ImportError:
from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import newSecurityManager
from AccessControl.SecurityManagement import noSecurityManager from AccessControl.SecurityManagement import noSecurityManager
from AccessControl.User import system as SystemUser, SimpleUser from AccessControl.users import system as SystemUser, SimpleUser
from six.moves import cStringIO as StringIO from six.moves import cStringIO as StringIO
from difflib import unified_diff from difflib import unified_diff
from Products.MailHost.MailHost import MailHost from Products.MailHost.MailHost import MailHost
......
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