Commit 0df4c670 authored by Aurel's avatar Aurel

apply absolute import fixer

parent f8c0337a
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -33,7 +34,7 @@ from AccessControl import ClassSecurityInfo ...@@ -33,7 +34,7 @@ from AccessControl import ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from ActivityRuntimeEnvironment import getActivityRuntimeEnvironment from .ActivityRuntimeEnvironment import getActivityRuntimeEnvironment
from AccessControl import Unauthorized from AccessControl import Unauthorized
from Products.CMFCore import permissions from Products.CMFCore import permissions
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
...@@ -42,7 +43,7 @@ from Products.CMFActivity.ActivityTool import ( ...@@ -42,7 +43,7 @@ from Products.CMFActivity.ActivityTool import (
Message, MESSAGE_NOT_EXECUTED, MESSAGE_EXECUTED, SkippedMessage) Message, MESSAGE_NOT_EXECUTED, MESSAGE_EXECUTED, SkippedMessage)
from Products.CMFActivity.ActivityRuntimeEnvironment import ( from Products.CMFActivity.ActivityRuntimeEnvironment import (
DEFAULT_MAX_RETRY, ActivityRuntimeEnvironment) DEFAULT_MAX_RETRY, ActivityRuntimeEnvironment)
from Queue import Queue, VALIDATION_ERROR_DELAY from .Queue import Queue, VALIDATION_ERROR_DELAY
from Products.CMFActivity.Errors import ActivityFlushError from Products.CMFActivity.Errors import ActivityFlushError
from Products.ERP5Type import Timeout from Products.ERP5Type import Timeout
from Products.ERP5Type.Timeout import TimeoutReachedError, Deadline from Products.ERP5Type.Timeout import TimeoutReachedError, Deadline
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved.
...@@ -30,7 +31,7 @@ from Shared.DC.ZRDB.Results import Results ...@@ -30,7 +31,7 @@ from Shared.DC.ZRDB.Results import Results
from Products.CMFActivity.ActivityTool import Message from Products.CMFActivity.ActivityTool import Message
import sys import sys
#from time import time #from time import time
from SQLBase import SQLBase, sort_message_key from .SQLBase import SQLBase, sort_message_key
import transaction import transaction
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved.
...@@ -30,12 +31,12 @@ from random import getrandbits ...@@ -30,12 +31,12 @@ from random import getrandbits
from zLOG import LOG, TRACE, INFO, WARNING, ERROR, PANIC from zLOG import LOG, TRACE, INFO, WARNING, ERROR, PANIC
import MySQLdb import MySQLdb
from MySQLdb.constants.ER import DUP_ENTRY from MySQLdb.constants.ER import DUP_ENTRY
from SQLBase import ( from .SQLBase import (
SQLBase, sort_message_key, SQLBase, sort_message_key,
UID_SAFE_BITSIZE, UID_ALLOCATION_TRY_COUNT, UID_SAFE_BITSIZE, UID_ALLOCATION_TRY_COUNT,
) )
from Products.CMFActivity.ActivityTool import Message from Products.CMFActivity.ActivityTool import Message
from SQLDict import SQLDict from .SQLDict import SQLDict
class SQLJoblib(SQLDict): class SQLJoblib(SQLDict):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002,2007 Nexedi SA and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from SQLBase import SQLBase from .SQLBase import SQLBase
class SQLQueue(SQLBase): class SQLQueue(SQLBase):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -47,8 +48,8 @@ from AccessControl.User import system as system_user ...@@ -47,8 +48,8 @@ from AccessControl.User 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
from ActivityBuffer import ActivityBuffer from .ActivityBuffer import ActivityBuffer
from ActivityRuntimeEnvironment import BaseMessage from .ActivityRuntimeEnvironment import BaseMessage
from zExceptions import ExceptionFormatter, Redirect from zExceptions import ExceptionFormatter, Redirect
from BTrees.OIBTree import OIBTree from BTrees.OIBTree import OIBTree
from BTrees.OOBTree import OOBTree from BTrees.OOBTree import OOBTree
...@@ -502,7 +503,7 @@ allow_class(GroupedMessage) ...@@ -502,7 +503,7 @@ allow_class(GroupedMessage)
# Activity Registration # Activity Registration
def activity_dict(): def activity_dict():
from Activity import SQLDict, SQLQueue, SQLJoblib from .Activity import SQLDict, SQLQueue, SQLJoblib
return {k: getattr(v, k)() for k, v in locals().iteritems()} return {k: getattr(v, k)() for k, v in locals().iteritems()}
activity_dict = activity_dict() activity_dict = activity_dict()
......
...@@ -29,10 +29,12 @@ ...@@ -29,10 +29,12 @@
ERP5Catalog provides an extended catalog based on ZSQLCatalog ERP5Catalog provides an extended catalog based on ZSQLCatalog
and extended local roles management and extended local roles management
""" """
from __future__ import absolute_import
# Update ERP5 Globals # Update ERP5 Globals
from Products.ERP5Type.Utils import initializeProduct, updateGlobals from Products.ERP5Type.Utils import initializeProduct, updateGlobals
import sys, Permissions import sys
from . import Permissions
this_module = sys.modules[ __name__ ] this_module = sys.modules[ __name__ ]
document_classes = updateGlobals(this_module, globals(), document_classes = updateGlobals(this_module, globals(),
permissions_module=Permissions) permissions_module=Permissions)
...@@ -40,7 +42,7 @@ document_classes = updateGlobals(this_module, globals(), ...@@ -40,7 +42,7 @@ document_classes = updateGlobals(this_module, globals(),
# Finish installation # Finish installation
def initialize( context ): def initialize( context ):
# Define object classes and tools # Define object classes and tools
import ActivityTool, ActiveProcess, ActivityConnection from . import ActivityTool, ActiveProcess, ActivityConnection
from .joblib import CMFActivityParallelBackend from .joblib import CMFActivityParallelBackend
object_classes = (ActiveProcess.ActiveProcess, object_classes = (ActiveProcess.ActiveProcess,
#ActivityConnection.ActivityConnection #ActivityConnection.ActivityConnection
......
...@@ -29,15 +29,17 @@ ...@@ -29,15 +29,17 @@
CMFCategory provides a way to implement categories and relations CMFCategory provides a way to implement categories and relations
in the CMF. It is based on the ERP5Type RAD in the CMF. It is based on the ERP5Type RAD
""" """
from __future__ import absolute_import
# Update ERP5 Globals # Update ERP5 Globals
from Products.ERP5Type.Utils import initializeProduct, updateGlobals from Products.ERP5Type.Utils import initializeProduct, updateGlobals
import sys, Permissions import sys
from . import Permissions
this_module = sys.modules[ __name__ ] this_module = sys.modules[ __name__ ]
document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions) document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions)
# Define object classes and tools # Define object classes and tools
import Category, CategoryTool from . import Category, CategoryTool
object_classes = () object_classes = ()
portal_tools = ( CategoryTool.CategoryTool, ) portal_tools = ( CategoryTool.CategoryTool, )
content_classes = () content_classes = ()
...@@ -45,7 +47,7 @@ content_constructors = () ...@@ -45,7 +47,7 @@ content_constructors = ()
# Finish installation # Finish installation
def initialize( context ): def initialize( context ):
import Document from . import Document
initializeProduct(context, this_module, globals(), initializeProduct(context, this_module, globals(),
document_module = Document, document_module = Document,
document_classes = document_classes, document_classes = document_classes,
......
...@@ -24,6 +24,7 @@ with tracebacks of the running python threads will be made. ...@@ -24,6 +24,7 @@ with tracebacks of the running python threads will be made.
You MUST configure zope.conf before use. You MUST configure zope.conf before use.
""" """
from __future__ import absolute_import
from zLOG import LOG, INFO, ERROR from zLOG import LOG, INFO, ERROR
from App.config import getConfiguration from App.config import getConfiguration
...@@ -42,5 +43,5 @@ if getattr(config, 'product_config', None) is not None: ...@@ -42,5 +43,5 @@ if getattr(config, 'product_config', None) is not None:
'optionally secret in <product-config deadlockdebugger>, not ' 'optionally secret in <product-config deadlockdebugger>, not '
'activated') 'activated')
else: else:
import dumper from . import dumper
LOG('DeadlockDebugger', INFO, "Installed") LOG('DeadlockDebugger', INFO, "Installed")
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
############################################################################## ##############################################################################
from DeliverySolver import DeliverySolver from __future__ import absolute_import
from .DeliverySolver import DeliverySolver
class Copy(DeliverySolver): class Copy(DeliverySolver):
""" """
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
############################################################################## ##############################################################################
from DeliverySolver import DeliverySolver from __future__ import absolute_import
from .DeliverySolver import DeliverySolver
class Distribute(DeliverySolver): class Distribute(DeliverySolver):
""" """
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
""" """
Portal class Portal class
""" """
from __future__ import absolute_import
from DateTime import DateTime from DateTime import DateTime
from six.moves import map from six.moves import map
...@@ -37,7 +38,7 @@ from Products.ERP5Type.Cache import CachingMethod, CacheCookieMixin ...@@ -37,7 +38,7 @@ from Products.ERP5Type.Cache import CachingMethod, CacheCookieMixin
from Products.ERP5Type.ERP5Type import ERP5TypeInformation from Products.ERP5Type.ERP5Type import ERP5TypeInformation
from Products.ERP5Type.patches.CMFCoreSkinnable import SKINDATA, skinResolve from Products.ERP5Type.patches.CMFCoreSkinnable import SKINDATA, skinResolve
from Products.CMFActivity.Errors import ActivityPendingError from Products.CMFActivity.Errors import ActivityPendingError
import ERP5Defaults from . import ERP5Defaults
from Products.ERP5Type.TransactionalVariable import \ from Products.ERP5Type.TransactionalVariable import \
getTransactionalVariable, TransactionalResource getTransactionalVariable, TransactionalResource
from Products.ERP5Type.dynamic.portal_type_class import synchronizeDynamicModules from Products.ERP5Type.dynamic.portal_type_class import synchronizeDynamicModules
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
import transaction import transaction
from Products.ERP5Type import Globals from Products.ERP5Type import Globals
import App import App
...@@ -106,7 +107,7 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject): ...@@ -106,7 +107,7 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
def __init__(self, id): def __init__(self, id):
self.id = id self.id = id
from Interaction import Interaction from .Interaction import Interaction
self._addObject(Interaction('interactions')) self._addObject(Interaction('interactions'))
from Products.DCWorkflow.Variables import Variables from Products.DCWorkflow.Variables import Variables
self._addObject(Variables('variables')) self._addObject(Variables('variables'))
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2008,2010 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2008,2010 Nexedi SA and Contributors. All Rights Reserved.
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
############################################################################## ##############################################################################
from TargetSolver import TargetSolver from .TargetSolver import TargetSolver
class Copy(TargetSolver): class Copy(TargetSolver):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
############################################################################## ##############################################################################
from TargetSolver import TargetSolver from .TargetSolver import TargetSolver
class CopyAndPropagate(TargetSolver): class CopyAndPropagate(TargetSolver):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
# #
############################################################################## ##############################################################################
from TargetSolver import TargetSolver from .TargetSolver import TargetSolver
class CopyToTarget(TargetSolver): class CopyToTarget(TargetSolver):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2008 Nexedi SA and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
############################################################################## ##############################################################################
from CopyToTarget import CopyToTarget from .CopyToTarget import CopyToTarget
class ProfitAndLoss(CopyToTarget): class ProfitAndLoss(CopyToTarget):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from TargetSolver import TargetSolver from .TargetSolver import TargetSolver
class Reduce(TargetSolver): class Reduce(TargetSolver):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
# #
############################################################################## ##############################################################################
from CopyToTarget import CopyToTarget from .CopyToTarget import CopyToTarget
class ResourceBackpropagation(CopyToTarget): class ResourceBackpropagation(CopyToTarget):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
############################################################################## ##############################################################################
from Products.ERP5Type.Globals import PersistentMapping from Products.ERP5Type.Globals import PersistentMapping
from CopyToTarget import CopyToTarget from .CopyToTarget import CopyToTarget
from Acquisition import aq_base from Acquisition import aq_base
class SplitAndDefer(CopyToTarget): class SplitAndDefer(CopyToTarget):
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
# #
############################################################################## ##############################################################################
from CopyToTarget import CopyToTarget from .CopyToTarget import CopyToTarget
from zLOG import LOG from zLOG import LOG
class SplitQuantity(CopyToTarget): class SplitQuantity(CopyToTarget):
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from CopyToTarget import CopyToTarget from .CopyToTarget import CopyToTarget
class TransformationSourcingCopyToTarget(CopyToTarget): class TransformationSourcingCopyToTarget(CopyToTarget):
""" """
......
...@@ -29,10 +29,12 @@ ...@@ -29,10 +29,12 @@
""" """
ERP5 Free Software ERP ERP5 Free Software ERP
""" """
from __future__ import absolute_import
# Update ERP5 Globals # Update ERP5 Globals
from Products.ERP5Type.Utils import initializeProduct, updateGlobals from Products.ERP5Type.Utils import initializeProduct, updateGlobals
import sys, Permissions import sys
from . import Permissions
this_module = sys.modules[ __name__ ] this_module = sys.modules[ __name__ ]
document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions) document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions)
from AccessControl import ModuleSecurityInfo from AccessControl import ModuleSecurityInfo
...@@ -41,12 +43,12 @@ from Products.ERP5Type.Globals import package_home ...@@ -41,12 +43,12 @@ from Products.ERP5Type.Globals import package_home
product_path = package_home( globals() ) product_path = package_home( globals() )
# Define object classes and tools # Define object classes and tools
from Tool import CategoryTool, IdTool, TemplateTool,\ from .Tool import CategoryTool, IdTool, TemplateTool,\
AlarmTool,\ AlarmTool,\
TrashTool,\ TrashTool,\
SolverTool SolverTool
import ERP5Site from . import ERP5Site
from Document import PythonScript, SQLMethod from .Document import PythonScript, SQLMethod
object_classes = ( ERP5Site.ERP5Site, object_classes = ( ERP5Site.ERP5Site,
PythonScript.PythonScriptThroughZMI, PythonScript.PythonScriptThroughZMI,
SQLMethod.SQLMethod, SQLMethod.SQLMethod,
...@@ -63,7 +65,7 @@ content_constructors = () ...@@ -63,7 +65,7 @@ content_constructors = ()
# Finish installation # Finish installation
def initialize( context ): def initialize( context ):
import Document from . import Document
# Initialize # Initialize
initializeProduct(context, this_module, globals(), initializeProduct(context, this_module, globals(),
document_module = Document, document_module = Document,
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from Item import Item from .Item import Item
class Container(Item): class Container(Item):
""" """
......
from Variation import Variation from __future__ import absolute_import
from Resource import Resource from .Variation import Variation
from MetaResource import MetaResource from .Resource import Resource
from MetaNode import MetaNode from .MetaResource import MetaResource
from .MetaNode import MetaNode
...@@ -29,17 +29,19 @@ ...@@ -29,17 +29,19 @@
ERP5Catalog provides an extended catalog based on ZSQLCatalog ERP5Catalog provides an extended catalog based on ZSQLCatalog
and extended local roles management and extended local roles management
""" """
from __future__ import absolute_import
# Update ERP5 Globals # Update ERP5 Globals
from Products.ERP5Type.Utils import initializeProduct, updateGlobals from Products.ERP5Type.Utils import initializeProduct, updateGlobals
import sys, Permissions import sys
from . import Permissions
this_module = sys.modules[ __name__ ] this_module = sys.modules[ __name__ ]
document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions) document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions)
# Define object classes and tools # Define object classes and tools
from Tool import ERP5CatalogTool from .Tool import ERP5CatalogTool
import CatalogTool from . import CatalogTool
object_classes = () object_classes = ()
portal_tools = (CatalogTool.CatalogTool, portal_tools = (CatalogTool.CatalogTool,
ERP5CatalogTool.ERP5CatalogTool) ERP5CatalogTool.ERP5CatalogTool)
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
from Products.Formulator import Widget, Validator from Products.Formulator import Widget, Validator
from Products.Formulator.Field import ZMIField from Products.Formulator.Field import ZMIField
from Products.Formulator.DummyField import fields from Products.Formulator.DummyField import fields
...@@ -35,7 +36,7 @@ from Products.PageTemplates.PageTemplateFile import PageTemplateFile ...@@ -35,7 +36,7 @@ from Products.PageTemplates.PageTemplateFile import PageTemplateFile
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Products.ERP5Type.Globals import DTMLFile from Products.ERP5Type.Globals import DTMLFile
from Products.Formulator.TALESField import TALESField from Products.Formulator.TALESField import TALESField
import CaptchasDotNet from . import CaptchasDotNet
import string import string
import random import random
from hashlib import md5 from hashlib import md5
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002,2006 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002,2006 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -33,8 +34,8 @@ from Products.Formulator.DummyField import fields ...@@ -33,8 +34,8 @@ from Products.Formulator.DummyField import fields
from Products.Formulator import Widget, Validator from Products.Formulator import Widget, Validator
from Products.Formulator.Field import ZMIField from Products.Formulator.Field import ZMIField
from Products.Formulator.Errors import FormValidationError, ValidationError from Products.Formulator.Errors import FormValidationError, ValidationError
from Selection import Selection, DomainSelection from .Selection import Selection, DomainSelection
from Tool.SelectionTool import createFolderMixInPageSelectionMethod from .Tool.SelectionTool import createFolderMixInPageSelectionMethod
from Products.ERP5Type.Utils import getPath from Products.ERP5Type.Utils import getPath
from Products.ERP5Type.Utils import UpperCase from Products.ERP5Type.Utils import UpperCase
from Products.ERP5Type.Document import newTempBase from Products.ERP5Type.Document import newTempBase
......
...@@ -27,12 +27,13 @@ ...@@ -27,12 +27,13 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
from ZTUtils import make_query from ZTUtils import make_query
from Products.Formulator import Widget from Products.Formulator import Widget
from Products.Formulator import Widget, Validator from Products.Formulator import Widget, Validator
from Products.Formulator.DummyField import fields from Products.Formulator.DummyField import fields
from Products.Formulator.Field import ZMIField from Products.Formulator.Field import ZMIField
from Selection import Selection from .Selection import Selection
from Products.ERP5Type.Globals import get_request from Products.ERP5Type.Globals import get_request
from zLOG import LOG from zLOG import LOG
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2005,2007 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2005,2007 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -46,8 +47,8 @@ from Products.Formulator.Field import ZMIField ...@@ -46,8 +47,8 @@ from Products.Formulator.Field import ZMIField
from Products.Formulator.DummyField import fields from Products.Formulator.DummyField import fields
from Products.Formulator import Widget, Validator from Products.Formulator import Widget, Validator
from Products.Formulator.Errors import FormValidationError, ValidationError from Products.Formulator.Errors import FormValidationError, ValidationError
from Tool.SelectionTool import makeTreeList from .Tool.SelectionTool import makeTreeList
from Selection import Selection from .Selection import Selection
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from zLOG import LOG from zLOG import LOG
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -38,9 +39,9 @@ from urllib import quote ...@@ -38,9 +39,9 @@ from urllib import quote
from warnings import warn from warnings import warn
from Products.ERP5Type import PropertySheet from Products.ERP5Type import PropertySheet
from Form import ERP5Form from .Form import ERP5Form
from Form import create_settings_form as Form_create_settings_form from .Form import create_settings_form as Form_create_settings_form
from Selection import Selection from .Selection import Selection
def create_settings_form(): def create_settings_form():
form = Form_create_settings_form() form = Form_create_settings_form()
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -30,7 +31,7 @@ from Products.Formulator import Widget ...@@ -30,7 +31,7 @@ from Products.Formulator import Widget
from Products.Formulator import Widget, Validator from Products.Formulator import Widget, Validator
from Products.Formulator.DummyField import fields from Products.Formulator.DummyField import fields
from Products.Formulator.Field import ZMIField from Products.Formulator.Field import ZMIField
from Selection import Selection from .Selection import Selection
from zLOG import LOG from zLOG import LOG
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2003-2006 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2003-2006 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -31,7 +32,7 @@ from Products.Formulator import Widget ...@@ -31,7 +32,7 @@ from Products.Formulator import Widget
from Products.Formulator import Widget, Validator from Products.Formulator import Widget, Validator
from Products.Formulator.DummyField import fields from Products.Formulator.DummyField import fields
from Products.Formulator.Field import ZMIField from Products.Formulator.Field import ZMIField
from Selection import Selection from .Selection import Selection
from Products.PythonScripts.PythonScript import PythonScript from Products.PythonScripts.PythonScript import PythonScript
try: try:
......
...@@ -29,11 +29,13 @@ ...@@ -29,11 +29,13 @@
ERP5 is a set of components to implement an ERP ERP5 is a set of components to implement an ERP
with Zope with Zope
""" """
from __future__ import absolute_import
# Update ERP5 Globals # Update ERP5 Globals
from Products.ERP5Type.Utils import initializeProduct, updateGlobals from Products.ERP5Type.Utils import initializeProduct, updateGlobals
from AccessControl import ModuleSecurityInfo from AccessControl import ModuleSecurityInfo
import sys, Permissions import sys
from . import Permissions
from Products.PythonScripts.Utility import allow_class from Products.PythonScripts.Utility import allow_class
from AccessControl.SecurityInfo import allow_module from AccessControl.SecurityInfo import allow_module
this_module = sys.modules[ __name__ ] this_module = sys.modules[ __name__ ]
...@@ -41,13 +43,13 @@ document_classes = updateGlobals( this_module, globals(), ...@@ -41,13 +43,13 @@ document_classes = updateGlobals( this_module, globals(),
permissions_module = Permissions) permissions_module = Permissions)
# Define object classes and tools # Define object classes and tools
import Form, FSForm, ListBox, ReportBox, MatrixBox from . import Form, FSForm, ListBox, ReportBox, MatrixBox
from Tool import SelectionTool from .Tool import SelectionTool
import OOoChart, PDFTemplate, Report, ParallelListField from . import OOoChart, PDFTemplate, Report, ParallelListField
import PlanningBox, POSBox, FormBox, EditorField, ProxyField, DurationField from . import PlanningBox, POSBox, FormBox, EditorField, ProxyField, DurationField
import RelationField, ImageField, MultiRelationField, MultiLinkField, InputButtonField from . import RelationField, ImageField, MultiRelationField, MultiLinkField, InputButtonField
import CaptchaField from . import CaptchaField
import PreferenceTool from . import PreferenceTool
from Products.Formulator.FieldRegistry import FieldRegistry from Products.Formulator.FieldRegistry import FieldRegistry
from Products.Formulator import StandardFields, HelperFields from Products.Formulator import StandardFields, HelperFields
...@@ -67,7 +69,7 @@ psyco.bind(ListBox.ListBoxValidator.validate) ...@@ -67,7 +69,7 @@ psyco.bind(ListBox.ListBoxValidator.validate)
# Finish installation # Finish installation
def initialize( context ): def initialize( context ):
import Document from . import Document
initializeProduct(context, this_module, globals(), initializeProduct(context, this_module, globals(),
document_module = Document, document_module = Document,
document_classes = document_classes, document_classes = document_classes,
...@@ -153,20 +155,20 @@ def initialize( context ): ...@@ -153,20 +155,20 @@ def initialize( context ):
FieldRegistry.registerField(HelperFields.MethodField) FieldRegistry.registerField(HelperFields.MethodField)
FieldRegistry.registerField(HelperFields.TALESField) FieldRegistry.registerField(HelperFields.TALESField)
import HyperLinkField from . import HyperLinkField
FieldRegistry.registerField(HyperLinkField.HyperLinkField, FieldRegistry.registerField(HyperLinkField.HyperLinkField,
'www/LinkField.gif') 'www/LinkField.gif')
import VideoField from . import VideoField
FieldRegistry.registerField(VideoField.VideoField, FieldRegistry.registerField(VideoField.VideoField,
'www/StringField.gif') 'www/StringField.gif')
import AudioField from . import AudioField
FieldRegistry.registerField(AudioField.AudioField, FieldRegistry.registerField(AudioField.AudioField,
'www/StringField.gif') 'www/StringField.gif')
import GadgetField from . import GadgetField
FieldRegistry.registerField(GadgetField.GadgetField, FieldRegistry.registerField(GadgetField.GadgetField,
'www/StringField.gif') 'www/StringField.gif')
import HoneypotField from . import HoneypotField
FieldRegistry.registerField(HoneypotField.HoneypotField, FieldRegistry.registerField(HoneypotField.HoneypotField,
'www/StringField.gif') 'www/StringField.gif')
...@@ -194,7 +196,7 @@ def initialize( context ): ...@@ -194,7 +196,7 @@ def initialize( context ):
ModuleSecurityInfo('Products.ERP5Form.Report').declarePublic('ReportSection',) ModuleSecurityInfo('Products.ERP5Form.Report').declarePublic('ReportSection',)
ModuleSecurityInfo('Products.ERP5Form.MultiRelationField').declarePublic('SUB_FIELD_ID',) ModuleSecurityInfo('Products.ERP5Form.MultiRelationField').declarePublic('SUB_FIELD_ID',)
allow_module('Products.ERP5Form.Selection') allow_module('Products.ERP5Form.Selection')
import Selection from . import Selection
allow_class(Selection) allow_class(Selection)
__module_aliases__ = ('Products.ERP5Form.SelectionTool', SelectionTool), __module_aliases__ = ('Products.ERP5Form.SelectionTool', SelectionTool),
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
from types import StringType from types import StringType
from mimetypes import guess_extension from mimetypes import guess_extension
from OFS.Image import File from OFS.Image import File
...@@ -40,7 +41,7 @@ from urllib import quote ...@@ -40,7 +41,7 @@ from urllib import quote
from Products.ERP5Type.Globals import InitializeClass, DTMLFile, get_request from Products.ERP5Type.Globals import InitializeClass, DTMLFile, get_request
from Acquisition import aq_base from Acquisition import aq_base
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from OOoUtils import OOoBuilder from .OOoUtils import OOoBuilder
from zipfile import ZipFile, ZIP_DEFLATED from zipfile import ZipFile, ZIP_DEFLATED
from cStringIO import StringIO from cStringIO import StringIO
import re import re
......
...@@ -30,11 +30,13 @@ ...@@ -30,11 +30,13 @@
ERP5OOo is a product containing general purpose tools to parse ERP5OOo is a product containing general purpose tools to parse
and handle OpenOffice documents. and handle OpenOffice documents.
""" """
from __future__ import absolute_import
# Update ERP5 Globals # Update ERP5 Globals
from Products.ERP5Type.Utils import initializeProduct, updateGlobals from Products.ERP5Type.Utils import initializeProduct, updateGlobals
from AccessControl.SecurityInfo import allow_module from AccessControl.SecurityInfo import allow_module
import sys, Permissions import sys
from . import Permissions
this_module = sys.modules[ __name__ ] this_module = sys.modules[ __name__ ]
document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions) document_classes = updateGlobals( this_module, globals(), permissions_module = Permissions)
...@@ -44,8 +46,8 @@ ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('OOoParser',) ...@@ -44,8 +46,8 @@ ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('OOoParser',)
ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('newOOoParser',) ModuleSecurityInfo('Products.ERP5OOo.OOoUtils').declarePublic('newOOoParser',)
# Define object classes and tools # Define object classes and tools
from OOoTemplate import OOoTemplate from .OOoTemplate import OOoTemplate
from FormPrintout import FormPrintout from .FormPrintout import FormPrintout
object_classes = (OOoTemplate, FormPrintout) object_classes = (OOoTemplate, FormPrintout)
portal_tools = () portal_tools = ()
content_classes = () content_classes = ()
...@@ -53,7 +55,7 @@ content_constructors = () ...@@ -53,7 +55,7 @@ content_constructors = ()
# Finish installation # Finish installation
def initialize( context ): def initialize( context ):
import Document from . import Document
initializeProduct(context, this_module, globals(), initializeProduct(context, this_module, globals(),
document_module = Document, document_module = Document,
document_classes = document_classes, document_classes = document_classes,
......
...@@ -27,8 +27,9 @@ ...@@ -27,8 +27,9 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
import unittest import unittest
from testIngestion import TestIngestion from Products.ERP5OOo.tests.testIngestion import TestIngestion
from Products.ERP5Type.tests.ERP5TypeTestCase import _getPersistentMemcachedServerDict from Products.ERP5Type.tests.ERP5TypeTestCase import _getPersistentMemcachedServerDict
class TestIngestionWithFlare(TestIngestion): class TestIngestionWithFlare(TestIngestion):
......
...@@ -26,8 +26,9 @@ ...@@ -26,8 +26,9 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
import unittest import unittest
from testOOoStyle import TestOOoStyle from Products.ERP5OOo.tests.testOOoStyle import TestOOoStyle
class TestOOoStyleWithFlare(TestOOoStyle): class TestOOoStyleWithFlare(TestOOoStyle):
"""Tests ODF styles for ERP5 with Flare.""" """Tests ODF styles for ERP5 with Flare."""
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implements
from oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from oood_commandtransform import includeMetaContentType from .oood_commandtransform import includeMetaContentType
from zLOG import LOG from zLOG import LOG
from lxml import etree, html from lxml import etree, html
from lxml.etree import Element, SubElement from lxml.etree import Element, SubElement
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implements
from oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from zLOG import LOG from zLOG import LOG
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implements
from oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from zLOG import LOG from zLOG import LOG
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import
from Products.PortalTransforms.interfaces import itransform from Products.PortalTransforms.interfaces import itransform
from zope.interface import implements from zope.interface import implements
from oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream from .oood_commandtransform import OOOdCommandTransform, OOoDocumentDataStream
from zLOG import LOG from zLOG import LOG
from Products.ERP5OOo.OOoUtils import OOoBuilder from Products.ERP5OOo.OOoUtils import OOoBuilder
import re import re
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
############################################################################## ##############################################################################
""" ERP5Security product initialization. """ ERP5Security product initialization.
""" """
from __future__ import absolute_import
from copy import deepcopy from copy import deepcopy
from collections import defaultdict from collections import defaultdict
...@@ -72,17 +73,17 @@ def _setUserNameForAccessLog(username, REQUEST): ...@@ -72,17 +73,17 @@ def _setUserNameForAccessLog(username, REQUEST):
def initialize(context): def initialize(context):
import ERP5UserManager from . import ERP5UserManager
import ERP5LoginUserManager from . import ERP5LoginUserManager
import ERP5GroupManager from . import ERP5GroupManager
import ERP5RoleManager from . import ERP5RoleManager
import ERP5UserFactory from . import ERP5UserFactory
import ERP5KeyAuthPlugin from . import ERP5KeyAuthPlugin
import ERP5ExternalAuthenticationPlugin from . import ERP5ExternalAuthenticationPlugin
import ERP5BearerExtractionPlugin from . import ERP5BearerExtractionPlugin
import ERP5ExternalOauth2ExtractionPlugin from . import ERP5ExternalOauth2ExtractionPlugin
import ERP5AccessTokenExtractionPlugin from . import ERP5AccessTokenExtractionPlugin
import ERP5DumbHTTPExtractionPlugin from . import ERP5DumbHTTPExtractionPlugin
registerMultiPlugin(ERP5UserManager.ERP5UserManager.meta_type) registerMultiPlugin(ERP5UserManager.ERP5UserManager.meta_type)
registerMultiPlugin(ERP5LoginUserManager.ERP5LoginUserManager.meta_type) registerMultiPlugin(ERP5LoginUserManager.ERP5LoginUserManager.meta_type)
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -58,10 +59,10 @@ class Accessor(Method): ...@@ -58,10 +59,10 @@ class Accessor(Method):
def asAlias(self, id): def asAlias(self, id):
# Returns an alias # Returns an alias
from Alias import Alias from .Alias import Alias
return Alias(id, self.__name__) return Alias(id, self.__name__)
def asReindexAlias(self, id): def asReindexAlias(self, id):
# Returns a reindexing alias # Returns a reindexing alias
from Alias import ReindexAlias from .Alias import ReindexAlias
return ReindexAlias(id, self.__name__) return ReindexAlias(id, self.__name__)
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter from .Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
class DefaultGetter(BaseGetter): class DefaultGetter(BaseGetter):
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
from Acquisition import aq_base from Acquisition import aq_base
from ZPublisher.HTTPRequest import FileUpload from ZPublisher.HTTPRequest import FileUpload
from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter, Tester as BaseTester from .Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter, Tester as BaseTester
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from zLOG import LOG from zLOG import LOG
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2007 Nexedi SA and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from Base import Setter from .Base import Setter
# Creation of default constructor # Creation of default constructor
class func_code: pass class func_code: pass
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -28,8 +29,8 @@ ...@@ -28,8 +29,8 @@
from ZPublisher.HTTPRequest import FileUpload from ZPublisher.HTTPRequest import FileUpload
from TypeDefinition import type_definition, list_types, ATTRIBUTE_PREFIX from .TypeDefinition import type_definition, list_types, ATTRIBUTE_PREFIX
from Accessor import Accessor as Method from .Accessor import Accessor as Method
from Acquisition import aq_base from Acquisition import aq_base
from zLOG import LOG from zLOG import LOG
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
from collections import OrderedDict from collections import OrderedDict
from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Setter as BaseSetter, Getter as BaseGetter from .Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Setter as BaseSetter, Getter as BaseGetter
from zLOG import LOG from zLOG import LOG
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2009 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2009 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
# #
############################################################################## ##############################################################################
from Accessor import Accessor from .Accessor import Accessor
# Creation of default constructor # Creation of default constructor
class func_code: pass class func_code: pass
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,8 +27,8 @@ ...@@ -26,8 +27,8 @@
# #
############################################################################## ##############################################################################
from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method from .Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Method
import Base from . import Base
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
Setter = Base.Setter Setter = Base.Setter
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -29,8 +30,8 @@ ...@@ -29,8 +30,8 @@
from Acquisition import aq_base from Acquisition import aq_base
from ZPublisher.HTTPRequest import FileUpload from ZPublisher.HTTPRequest import FileUpload
from Base import func_code, type_definition, ATTRIBUTE_PREFIX, Method from .Base import func_code, type_definition, ATTRIBUTE_PREFIX, Method
import Base from . import Base
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
Setter = Base.Setter Setter = Base.Setter
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,10 +28,10 @@ ...@@ -27,10 +28,10 @@
############################################################################## ##############################################################################
from Base import func_code, type_definition, list_types,\ from .Base import func_code, type_definition, list_types,\
ATTRIBUTE_PREFIX, Method, evaluateTales ATTRIBUTE_PREFIX, Method, evaluateTales
from TypeDefinition import asList, identity from .TypeDefinition import asList, identity
import Base from . import Base
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from Acquisition import aq_base from Acquisition import aq_base
from types import ListType, TupleType from types import ListType, TupleType
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2007 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2007 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter from .Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from zLOG import LOG from zLOG import LOG
from zLOG import WARNING from zLOG import WARNING
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2007 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2007 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from Base import func_code, type_definition, list_types, \ from .Base import func_code, type_definition, list_types, \
ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter ATTRIBUTE_PREFIX, Getter as BaseGetter, Setter as BaseSetter
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from zLOG import LOG from zLOG import LOG
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
from collections import OrderedDict from collections import OrderedDict
from operator import methodcaller from operator import methodcaller
from Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Setter as BaseSetter, Getter as BaseGetter from .Base import func_code, type_definition, list_types, ATTRIBUTE_PREFIX, Setter as BaseSetter, Getter as BaseGetter
from zLOG import LOG from zLOG import LOG
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from Products.ERP5Type.Utils import convertToUpperCase from Products.ERP5Type.Utils import convertToUpperCase
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2018 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2018 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
############################################################################## ##############################################################################
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from Base import Getter as BaseGetter from .Base import Getter as BaseGetter
from Acquisition import aq_base from Acquisition import aq_base
class ListGetter(BaseGetter): class ListGetter(BaseGetter):
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002-2003 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
from Acquisition import aq_base from Acquisition import aq_base
from Products.ERP5Type.PsycoWrapper import psyco from Products.ERP5Type.PsycoWrapper import psyco
from Base import Getter as BaseGetter, Setter as BaseSetter from .Base import Getter as BaseGetter, Setter as BaseSetter
from warnings import warn from warnings import warn
# Creation of default constructor # Creation of default constructor
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
from struct import unpack from struct import unpack
from copy import copy from copy import copy
import warnings import warnings
...@@ -72,13 +73,13 @@ from Products.ERP5Type.Accessor import Base as BaseAccessor ...@@ -72,13 +73,13 @@ from Products.ERP5Type.Accessor import Base as BaseAccessor
from Products.ERP5Type.mixin.property_translatable import PropertyTranslatableBuiltInDictMixIn from Products.ERP5Type.mixin.property_translatable import PropertyTranslatableBuiltInDictMixIn
from Products.ERP5Type.XMLExportImport import Base_asXML from Products.ERP5Type.XMLExportImport import Base_asXML
from Products.ERP5Type.Cache import CachingMethod, clearCache, getReadOnlyTransactionCache from Products.ERP5Type.Cache import CachingMethod, clearCache, getReadOnlyTransactionCache
from Accessor import WorkflowState from .Accessor import WorkflowState
from Products.ERP5Type.TransactionalVariable import getTransactionalVariable from Products.ERP5Type.TransactionalVariable import getTransactionalVariable
from Products.ERP5Type.Accessor.TypeDefinition import type_definition from Products.ERP5Type.Accessor.TypeDefinition import type_definition
from CopySupport import CopyContainer, CopyError,\ from .CopySupport import CopyContainer, CopyError,\
tryMethodCallWithTemporaryPermission tryMethodCallWithTemporaryPermission
from Errors import DeferredCatalogError, UnsupportedWorkflowMethod from .Errors import DeferredCatalogError, UnsupportedWorkflowMethod
from Products.CMFActivity.ActiveObject import ActiveObject from Products.CMFActivity.ActiveObject import ActiveObject
from Products.ERP5Type.Accessor.Accessor import Accessor as Method from Products.ERP5Type.Accessor.Accessor import Accessor as Method
from Products.ERP5Type.Message import Message from Products.ERP5Type.Message import Message
......
...@@ -27,13 +27,14 @@ ...@@ -27,13 +27,14 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
import string import string
from contextlib import contextmanager from contextlib import contextmanager
from time import time from time import time
from AccessControl import allow_class, ClassSecurityInfo from AccessControl import allow_class, ClassSecurityInfo
from Acquisition import aq_base from Acquisition import aq_base
from BTrees.Length import Length from BTrees.Length import Length
from CachePlugins.BaseCache import CachedMethodError from .CachePlugins.BaseCache import CachedMethodError
from persistent import Persistent from persistent import Persistent
from zLOG import LOG, WARNING from zLOG import LOG, WARNING
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
......
...@@ -30,10 +30,11 @@ ...@@ -30,10 +30,11 @@
""" """
Memcached based cache plugin. Memcached based cache plugin.
""" """
from __future__ import absolute_import
from threading import local from threading import local
from zLOG import LOG, WARNING from zLOG import LOG, WARNING
from BaseCache import BaseCache from .BaseCache import BaseCache
from BaseCache import CacheEntry from .BaseCache import CacheEntry
from Products.ERP5Type import interfaces from Products.ERP5Type import interfaces
import zope.interface import zope.interface
from base64 import encodestring from base64 import encodestring
......
...@@ -27,8 +27,9 @@ ...@@ -27,8 +27,9 @@
############################################################################## ##############################################################################
"Dummy (no cache)" "Dummy (no cache)"
from __future__ import absolute_import
from BaseCache import BaseCache from .BaseCache import BaseCache
class DummyCache(BaseCache): class DummyCache(BaseCache):
""" Dummy cache plugin. """ """ Dummy cache plugin. """
......
...@@ -30,9 +30,10 @@ ...@@ -30,9 +30,10 @@
""" """
Local RAM based cache plugin. Local RAM based cache plugin.
""" """
from __future__ import absolute_import
import time import time
from BaseCache import BaseCache, CacheEntry from .BaseCache import BaseCache, CacheEntry
from Products.ERP5Type import interfaces from Products.ERP5Type import interfaces
import zope.interface import zope.interface
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2009 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002, 2009 Nexedi SA and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from PropertyExistence import PropertyExistence from .PropertyExistence import PropertyExistence
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
class AttributeBlacklisted(PropertyExistence): class AttributeBlacklisted(PropertyExistence):
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
# #
############################################################################## ##############################################################################
from PropertyExistence import PropertyExistence from .PropertyExistence import PropertyExistence
class AttributeEquality(PropertyExistence): class AttributeEquality(PropertyExistence):
""" """
......
...@@ -30,7 +30,8 @@ ...@@ -30,7 +30,8 @@
# #
############################################################################## ##############################################################################
from PropertyExistence import PropertyExistence from __future__ import absolute_import
from .PropertyExistence import PropertyExistence
from Products.CMFCore.Expression import Expression from Products.CMFCore.Expression import Expression
class AttributeUnicity(PropertyExistence): class AttributeUnicity(PropertyExistence):
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
# #
############################################################################## ##############################################################################
from Constraint import Constraint from .Constraint import Constraint
from Products.ERP5Type.Constraint.CategoryMembershipArity \ from Products.ERP5Type.Constraint.CategoryMembershipArity \
import CategoryMembershipArity import CategoryMembershipArity
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
# #
############################################################################## ##############################################################################
from Constraint import Constraint from .Constraint import Constraint
class CategoryExistence(Constraint): class CategoryExistence(Constraint):
"""This constraint checks if an object respects the existence of """This constraint checks if an object respects the existence of
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
# #
############################################################################## ##############################################################################
from Constraint import Constraint from .Constraint import Constraint
class CategoryMembershipArity(Constraint): class CategoryMembershipArity(Constraint):
""" """
......
...@@ -28,7 +28,8 @@ ...@@ -28,7 +28,8 @@
# #
############################################################################## ##############################################################################
from Constraint import Constraint from __future__ import absolute_import
from .Constraint import Constraint
from Products.ERP5Type.Constraint.CategoryMembershipArity \ from Products.ERP5Type.Constraint.CategoryMembershipArity \
import CategoryMembershipArity import CategoryMembershipArity
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -26,7 +27,7 @@ ...@@ -26,7 +27,7 @@
# #
############################################################################## ##############################################################################
from Constraint import Constraint from .Constraint import Constraint
from Products.CMFCore.utils import getToolByName from Products.CMFCore.utils import getToolByName
from Products.ERP5Type.Cache import CachingMethod from Products.ERP5Type.Cache import CachingMethod
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002, 2005 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
# #
############################################################################## ##############################################################################
from Constraint import Constraint from .Constraint import Constraint
class PropertyExistence(Constraint): class PropertyExistence(Constraint):
""" """
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved. # Copyright (c) 2002-2012 Nexedi SA and Contributors. All Rights Reserved.
...@@ -28,7 +29,7 @@ ...@@ -28,7 +29,7 @@
# #
############################################################################## ##############################################################################
from Constraint import Constraint from .Constraint import Constraint
from DateTime import DateTime from DateTime import DateTime
boolean_type_list = (int, bool) boolean_type_list = (int, bool)
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -36,7 +37,7 @@ CompilerError = Products.PageTemplates.Expressions.getEngine().getCompilerError( ...@@ -36,7 +37,7 @@ CompilerError = Products.PageTemplates.Expressions.getEngine().getCompilerError(
from zLOG import LOG, PROBLEM from zLOG import LOG, PROBLEM
from Constraint import Constraint from .Constraint import Constraint
class TALESConstraint(Constraint): class TALESConstraint(Constraint):
"""This constraint uses an arbitrary TALES expression on the context of the """This constraint uses an arbitrary TALES expression on the context of the
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from Constraint import Constraint from __future__ import absolute_import
from PropertyTypeValidity import PropertyTypeValidity from .Constraint import Constraint
from CategoryMembershipArity import CategoryMembershipArity from .PropertyTypeValidity import PropertyTypeValidity
from CategoryRelatedMembershipArity import CategoryRelatedMembershipArity from .CategoryMembershipArity import CategoryMembershipArity
from AttributeEquality import AttributeEquality from .CategoryRelatedMembershipArity import CategoryRelatedMembershipArity
from AttributeUnicity import AttributeUnicity from .AttributeEquality import AttributeEquality
from AttributeBlacklisted import AttributeBlacklisted from .AttributeUnicity import AttributeUnicity
from PropertyExistence import PropertyExistence from .AttributeBlacklisted import AttributeBlacklisted
from CategoryExistence import CategoryExistence from .PropertyExistence import PropertyExistence
from CategoryExistence import CategoryAcquiredExistence from .CategoryExistence import CategoryExistence
from PortalTypeClass import PortalTypeClass from .CategoryExistence import CategoryAcquiredExistence
from CategoryAcquiredMembershipArity import CategoryAcquiredMembershipArity from .PortalTypeClass import PortalTypeClass
from TALESConstraint import TALESConstraint from .CategoryAcquiredMembershipArity import CategoryAcquiredMembershipArity
from ContentExistence import ContentExistence from .TALESConstraint import TALESConstraint
from StringAttributeMatch import StringAttributeMatch from .ContentExistence import ContentExistence
from CategoryMembershipState import CategoryMembershipState from .StringAttributeMatch import StringAttributeMatch
from CategoryAcquiredMembershipState import CategoryAcquiredMembershipState from .CategoryMembershipState import CategoryMembershipState
from CategoryRelatedMembershipState import CategoryRelatedMembershipState from .CategoryAcquiredMembershipState import CategoryAcquiredMembershipState
from .CategoryRelatedMembershipState import CategoryRelatedMembershipState
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
# #
############################################################################## ##############################################################################
from __future__ import absolute_import
from functools import partial from functools import partial
import zope.interface import zope.interface
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
...@@ -43,7 +44,7 @@ from Products.ERP5Type.dynamic.accessor_holder import getPropertySheetValueList, ...@@ -43,7 +44,7 @@ from Products.ERP5Type.dynamic.accessor_holder import getPropertySheetValueList,
ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT = 'ERP5Type_asSecurityGroupId' ERP5TYPE_SECURITY_GROUP_ID_GENERATION_SCRIPT = 'ERP5Type_asSecurityGroupId'
from TranslationProviderBase import TranslationProviderBase from .TranslationProviderBase import TranslationProviderBase
from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter from Products.ERP5Type.Accessor.Constant import PropertyGetter as ConstantGetter
from Products.ERP5Type.Accessor.Translation import TRANSLATION_DOMAIN_CONTENT_TRANSLATION from Products.ERP5Type.Accessor.Translation import TRANSLATION_DOMAIN_CONTENT_TRANSLATION
from zLOG import LOG, ERROR from zLOG import LOG, ERROR
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
############################################################################## ##############################################################################
from __future__ import absolute_import
import os, re, string, sys import os, re, string, sys
from Products.ERP5Type import document_class_registry from Products.ERP5Type import document_class_registry
from Products.ERP5Type.Globals import package_home, InitializeClass from Products.ERP5Type.Globals import package_home, InitializeClass
...@@ -55,7 +56,7 @@ def InitializeInteractor(interactor_class, interactor_path=None): ...@@ -55,7 +56,7 @@ def InitializeInteractor(interactor_class, interactor_path=None):
product_interactor_registry.append(((interactor_class, interactor_path))) product_interactor_registry.append(((interactor_class, interactor_path)))
def initializeProductDocumentRegistry(): def initializeProductDocumentRegistry():
from Utils import importLocalDocument from .Utils import importLocalDocument
count = len(product_document_registry) count = len(product_document_registry)
for (class_id, class_path) in product_document_registry.iteritems(): for (class_id, class_path) in product_document_registry.iteritems():
importLocalDocument(class_id, class_path=class_path) importLocalDocument(class_id, class_path=class_path)
...@@ -68,7 +69,7 @@ def initializeProductDocumentRegistry(): ...@@ -68,7 +69,7 @@ def initializeProductDocumentRegistry():
assert count == len(product_document_registry) assert count == len(product_document_registry)
def initializeProductInteractorRegistry(): def initializeProductInteractorRegistry():
from Utils import importLocalInteractor from .Utils import importLocalInteractor
for (class_id, interactor_path) in product_interactor_registry: for (class_id, interactor_path) in product_interactor_registry:
if class_id != 'Interactor': # Base class can not be global and placeless if class_id != 'Interactor': # Base class can not be global and placeless
importLocalInteractor(class_id, path=interactor_path) importLocalInteractor(class_id, path=interactor_path)
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved. # Copyright (c) 2002 Zope Corporation and Contributors. All Rights Reserved.
...@@ -13,7 +14,7 @@ ...@@ -13,7 +14,7 @@
############################################################################## ##############################################################################
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from Permissions import AccessContentsInformation, ManagePortal, \ from .Permissions import AccessContentsInformation, ManagePortal, \
ModifyPortalContent ModifyPortalContent
from OFS.SimpleItem import SimpleItem from OFS.SimpleItem import SimpleItem
from Acquisition import aq_base from Acquisition import aq_base
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
############################################################################## ##############################################################################
# Required modules - some modules are imported later to prevent circular deadlocks # Required modules - some modules are imported later to prevent circular deadlocks
from __future__ import absolute_import
import os import os
import re import re
import string import string
...@@ -114,8 +115,8 @@ from Products.ERP5Type.Globals import get_request ...@@ -114,8 +115,8 @@ from Products.ERP5Type.Globals import get_request
# Compatibility - XXX - BAD # Compatibility - XXX - BAD
##################################################### #####################################################
from Accessor.TypeDefinition import type_definition from .Accessor.TypeDefinition import type_definition
from Accessor.TypeDefinition import list_types from .Accessor.TypeDefinition import list_types
##################################################### #####################################################
# Generic sort method # Generic sort method
...@@ -551,7 +552,7 @@ def checkPythonSourceCode(source_code_str, portal_type=None): ...@@ -551,7 +552,7 @@ def checkPythonSourceCode(source_code_str, portal_type=None):
# Globals initialization # Globals initialization
##################################################### #####################################################
from InitGenerator import InitializeDocument, InitializeInteractor, registerInteractorClass from .InitGenerator import InitializeDocument, InitializeInteractor, registerInteractorClass
# List Regexp # List Regexp
python_file_expr = re.compile("py$") python_file_expr = re.compile("py$")
...@@ -641,7 +642,7 @@ import imp ...@@ -641,7 +642,7 @@ import imp
from App.config import getConfiguration from App.config import getConfiguration
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
from Accessor.Base import func_code from .Accessor.Base import func_code
from Products.CMFCore.utils import manage_addContentForm, manage_addContent from Products.CMFCore.utils import manage_addContentForm, manage_addContent
from AccessControl.PermissionRole import PermissionRole from AccessControl.PermissionRole import PermissionRole
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2002 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -33,7 +34,7 @@ from Products.ERP5Type import _dtmldir ...@@ -33,7 +34,7 @@ from Products.ERP5Type import _dtmldir
from Products.ERP5Type import PropertySheet, Permissions from Products.ERP5Type import PropertySheet, Permissions
from Products.ERP5Type.Utils import convertToUpperCase from Products.ERP5Type.Utils import convertToUpperCase
from Core.Folder import Folder from .Core.Folder import Folder
from zLOG import LOG from zLOG import LOG
class XMLObject( Folder ): class XMLObject( Folder ):
......
...@@ -30,8 +30,9 @@ ...@@ -30,8 +30,9 @@
ERP5Type is provides a RAD environment for Zope / CMF ERP5Type is provides a RAD environment for Zope / CMF
All ERP5 classes derive from ERP5Type All ERP5 classes derive from ERP5Type
""" """
from __future__ import absolute_import
from App.config import getConfiguration from App.config import getConfiguration
from patches import python, pylint, globalrequest from .patches import python, pylint, globalrequest
from zLOG import LOG, INFO from zLOG import LOG, INFO
DISPLAY_BOOT_PROCESS = False DISPLAY_BOOT_PROCESS = False
...@@ -60,14 +61,15 @@ mixin_class_registry = {} ...@@ -60,14 +61,15 @@ mixin_class_registry = {}
# old class definitions will still work with properties such as # old class definitions will still work with properties such as
# property_sheets = (ERP5Type.PropertySheet.YYY, ... ) # property_sheets = (ERP5Type.PropertySheet.YYY, ... )
# after transforming 'YYY' into a ZODB property sheet # after transforming 'YYY' into a ZODB property sheet
from dynamic.dynamic_module import registerDynamicModule from .dynamic.dynamic_module import registerDynamicModule
PropertySheet = registerDynamicModule('Products.ERP5Type.PropertySheet', PropertySheet = registerDynamicModule('Products.ERP5Type.PropertySheet',
lambda name: name) lambda name: name)
# Switch(es) for ongoing development which require single code base # Switch(es) for ongoing development which require single code base
# Update ERP5 Globals # Update ERP5 Globals
import sys, Permissions, os import sys, os
from . import Permissions
from App.Common import package_home from App.Common import package_home
this_module = sys.modules[ __name__ ] this_module = sys.modules[ __name__ ]
product_path = package_home( globals() ) product_path = package_home( globals() )
...@@ -78,8 +80,8 @@ document_classes = updateGlobals( this_module, ...@@ -78,8 +80,8 @@ document_classes = updateGlobals( this_module,
permissions_module=Permissions, permissions_module=Permissions,
is_erp5_type=1 ) is_erp5_type=1 )
import ZopePatch from . import ZopePatch
import interfaces from . import interfaces
import Products.Localizer # So that we make sure Globals.get_request is available import Products.Localizer # So that we make sure Globals.get_request is available
...@@ -88,14 +90,14 @@ import Products.ERP5Type.Workflow ...@@ -88,14 +90,14 @@ import Products.ERP5Type.Workflow
def initialize( context ): def initialize( context ):
# Import Product Components # Import Product Components
from Tool import (CacheTool, MemcachedTool, from .Tool import (CacheTool, MemcachedTool,
TypesTool, PropertySheetTool, TypesTool, PropertySheetTool,
ComponentTool) ComponentTool)
import Document from . import Document
from Base import Base from .Base import Base
import XMLObject from . import XMLObject
from ERP5Type import ERP5TypeInformation from .ERP5Type import ERP5TypeInformation
import CodingStyle from . import CodingStyle
# Define documents, classes, constructors and tools # Define documents, classes, constructors and tools
object_classes = () object_classes = ()
content_constructors = () content_constructors = ()
......
from __future__ import absolute_import
############################################################################## ##############################################################################
# #
# Copyright (c) 2010-2012 Nexedi SARL and Contributors. All Rights Reserved. # Copyright (c) 2010-2012 Nexedi SARL and Contributors. All Rights Reserved.
...@@ -205,7 +206,7 @@ def initializeDynamicModules(): ...@@ -205,7 +206,7 @@ def initializeDynamicModules():
erp5.document = ModuleType("erp5.document") erp5.document = ModuleType("erp5.document")
# Portal types as classes # Portal types as classes
from accessor_holder import AccessorHolderType, AccessorHolderModuleType from .accessor_holder import AccessorHolderType, AccessorHolderModuleType
erp5.accessor_holder = AccessorHolderModuleType("erp5.accessor_holder") erp5.accessor_holder = AccessorHolderModuleType("erp5.accessor_holder")
erp5.accessor_holder.__path__ = [] erp5.accessor_holder.__path__ = []
...@@ -217,18 +218,18 @@ def initializeDynamicModules(): ...@@ -217,18 +218,18 @@ def initializeDynamicModules():
'erp5.accessor_holder.portal_type', 'erp5.accessor_holder.portal_type',
AccessorHolderModuleType) AccessorHolderModuleType)
from lazy_class import generateLazyPortalTypeClass from .lazy_class import generateLazyPortalTypeClass
erp5.portal_type = registerDynamicModule('erp5.portal_type', erp5.portal_type = registerDynamicModule('erp5.portal_type',
generateLazyPortalTypeClass) generateLazyPortalTypeClass)
from portal_type_class import loadTempPortalTypeClass from .portal_type_class import loadTempPortalTypeClass
erp5.temp_portal_type = registerDynamicModule('erp5.temp_portal_type', erp5.temp_portal_type = registerDynamicModule('erp5.temp_portal_type',
loadTempPortalTypeClass) loadTempPortalTypeClass)
# ZODB Components # ZODB Components
erp5.component = ComponentPackageType("erp5.component") erp5.component = ComponentPackageType("erp5.component")
from component_package import (ComponentDynamicPackage, from .component_package import (ComponentDynamicPackage,
ToolComponentDynamicPackage) ToolComponentDynamicPackage)
# Prevent other threads to create erp5.* packages and modules or seeing them # Prevent other threads to create erp5.* packages and modules or seeing them
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import
from Products.ERP5Type import Permissions from Products.ERP5Type import Permissions
from Products.ERP5Type.Accessor.Constant import Getter as ConstantGetter from Products.ERP5Type.Accessor.Constant import Getter as ConstantGetter
from Products.ERP5Type.Globals import InitializeClass from Products.ERP5Type.Globals import InitializeClass
...@@ -15,9 +16,9 @@ from ZODB.broken import Broken, PersistentBroken ...@@ -15,9 +16,9 @@ from ZODB.broken import Broken, PersistentBroken
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
from zLOG import LOG, WARNING, BLATHER from zLOG import LOG, WARNING, BLATHER
from portal_type_class import generatePortalTypeClass from .portal_type_class import generatePortalTypeClass
from accessor_holder import AccessorHolderType from .accessor_holder import AccessorHolderType
import persistent_migration from . import persistent_migration
from ZODB.POSException import ConflictError from ZODB.POSException import ConflictError
class ERP5BaseBroken(Broken, ERP5Base, PersistentBroken): class ERP5BaseBroken(Broken, ERP5Base, PersistentBroken):
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
# XXX/FIXME: tried to work without explicit definition of all interfaces (this # XXX/FIXME: tried to work without explicit definition of all interfaces (this
# file empty) but failed to do so # file empty) but failed to do so
from consistency_message import IConsistencyMessage from __future__ import absolute_import
from object_message import IObjectMessage from .consistency_message import IConsistencyMessage
from action_provider import IAction, IActionContainer from .object_message import IObjectMessage
from cache_plugin import ICachePlugin from .action_provider import IAction, IActionContainer
from category_access_provider import ICategoryAccessProvider from .cache_plugin import ICachePlugin
from value_access_provider import IValueAccessProvider from .category_access_provider import ICategoryAccessProvider
from constraint import IConstraint from .value_access_provider import IValueAccessProvider
from role_provider import ILocalRoleAssignor, ILocalRoleGenerator from .constraint import IConstraint
from types_tool import ITypesTool, ITypeProvider from .role_provider import ILocalRoleAssignor, ILocalRoleGenerator
from .types_tool import ITypesTool, ITypeProvider
#!/usr/bin/env python2.7 #!/usr/bin/env python2.7
from __future__ import absolute_import
import argparse, sys, os, textwrap import argparse, sys, os, textwrap
from erp5.util import taskdistribution from erp5.util import taskdistribution
# XXX: This import is required, just to populate sys.modules['test_suite']. # XXX: This import is required, just to populate sys.modules['test_suite'].
# Even if it's not used in this file. Yuck. # Even if it's not used in this file. Yuck.
import ERP5TypeTestSuite from . import ERP5TypeTestSuite
def _parsingErrorHandler(data, _): def _parsingErrorHandler(data, _):
print >> sys.stderr, 'Error parsing data:', repr(data) print >> sys.stderr, 'Error parsing data:', repr(data)
......
...@@ -29,11 +29,12 @@ ...@@ -29,11 +29,12 @@
ERP5Workflow is a product containing Document to create ERP5Workflow is a product containing Document to create
workflow in the ERP5 way. workflow in the ERP5 way.
""" """
from __future__ import absolute_import
# Update ERP5 Globals # Update ERP5 Globals
from Products.ERP5Type.Utils import initializeProduct, updateGlobals from Products.ERP5Type.Utils import initializeProduct, updateGlobals
import sys import sys
import Permissions from . import Permissions
this_module = sys.modules[__name__] this_module = sys.modules[__name__]
document_classes = updateGlobals(this_module, globals(), document_classes = updateGlobals(this_module, globals(),
permissions_module=Permissions) permissions_module=Permissions)
...@@ -46,7 +47,7 @@ content_constructors = () ...@@ -46,7 +47,7 @@ content_constructors = ()
# Finish installation # Finish installation
def initialize(context): def initialize(context):
import Document from . import Document
initializeProduct(context, this_module, globals(), initializeProduct(context, this_module, globals(),
document_module=Document, document_module=Document,
document_classes=document_classes, document_classes=document_classes,
......
...@@ -8,8 +8,9 @@ When the field classes have been defined, get_field() ...@@ -8,8 +8,9 @@ When the field classes have been defined, get_field()
can be used on FieldProperty objects to get an can be used on FieldProperty objects to get an
actual field object. actual field object.
""" """
from __future__ import absolute_import
from FieldRegistry import FieldRegistry from .FieldRegistry import FieldRegistry
class DummyFieldFactory: class DummyFieldFactory:
def __getattr__(self, name): def __getattr__(self, name):
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import
from App.class_init import default__class_init__ as InitializeClass from App.class_init import default__class_init__ as InitializeClass
import Acquisition import Acquisition
from Persistence import Persistent from Persistence import Persistent
...@@ -6,7 +7,7 @@ from App.special_dtml import DTMLFile ...@@ -6,7 +7,7 @@ from App.special_dtml import DTMLFile
from AccessControl import ClassSecurityInfo from AccessControl import ClassSecurityInfo
import OFS import OFS
from Shared.DC.Scripts.Bindings import Bindings from Shared.DC.Scripts.Bindings import Bindings
from Errors import ValidationError from .Errors import ValidationError
from Products.Formulator.Widget import MultiItemsWidget from Products.Formulator.Widget import MultiItemsWidget
from zLOG import LOG from zLOG import LOG
from lxml import etree from lxml import etree
...@@ -648,7 +649,7 @@ class ZMIField( ...@@ -648,7 +649,7 @@ class ZMIField(
"""Change TALES expressions through XMLRPC. """Change TALES expressions through XMLRPC.
""" """
# BEWARE: there is no validation on the values passed through the map # BEWARE: there is no validation on the values passed through the map
from TALESField import TALESMethod from .TALESField import TALESMethod
result = {} result = {}
for key, value in map.items(): for key, value in map.items():
if value: if value:
......
from __future__ import absolute_import
import os import os
import OFS import OFS
from App.ImageFile import ImageFile from App.ImageFile import ImageFile
from FieldHelpTopic import FieldHelpTopic from .FieldHelpTopic import FieldHelpTopic
class FieldRegistry: class FieldRegistry:
"""A registry of fields, maintaining a dictionary with """A registry of fields, maintaining a dictionary with
...@@ -62,8 +63,8 @@ def initializeFieldForm(field_class): ...@@ -62,8 +63,8 @@ def initializeFieldForm(field_class):
"""Initialize the properties (fields and values) on a particular """Initialize the properties (fields and values) on a particular
field class. Also add the tales and override methods. field class. Also add the tales and override methods.
""" """
from Form import BasicForm from .Form import BasicForm
from DummyField import fields from .DummyField import fields
form = BasicForm() form = BasicForm()
override_form = BasicForm() override_form = BasicForm()
......
from __future__ import absolute_import
import AccessControl import AccessControl
import OFS import OFS
from App.class_init import default__class_init__ as InitializeClass from App.class_init import default__class_init__ as InitializeClass
...@@ -15,12 +16,12 @@ import os ...@@ -15,12 +16,12 @@ import os
import string import string
from StringIO import StringIO from StringIO import StringIO
from Errors import ValidationError, FormValidationError, FieldDisabledError from .Errors import ValidationError, FormValidationError, FieldDisabledError
from FieldRegistry import FieldRegistry from .FieldRegistry import FieldRegistry
from Widget import render_tag from .Widget import render_tag
from DummyField import fields from .DummyField import fields
from FormToXML import formToXML from .FormToXML import formToXML
from XMLToForm import XMLToForm from .XMLToForm import XMLToForm
from ComputedAttribute import ComputedAttribute from ComputedAttribute import ComputedAttribute
......
from __future__ import absolute_import
# include some helper fields which are in their own files # include some helper fields which are in their own files
from MethodField import MethodField from .MethodField import MethodField
from ListTextAreaField import ListTextAreaField from .ListTextAreaField import ListTextAreaField
from TALESField import TALESField from .TALESField import TALESField
from __future__ import absolute_import
import string import string
from DummyField import fields from .DummyField import fields
import Widget, Validator from . import Widget, Validator
from Field import ZMIField from .Field import ZMIField
class ListTextAreaWidget(Widget.TextAreaWidget): class ListTextAreaWidget(Widget.TextAreaWidget):
default = fields.ListTextAreaField('default', default = fields.ListTextAreaField('default',
......
from __future__ import absolute_import
import string import string
from DummyField import fields from .DummyField import fields
import Widget, Validator from . import Widget, Validator
from Persistence import Persistent from Persistence import Persistent
import Acquisition import Acquisition
from Field import ZMIField from .Field import ZMIField
from AccessControl import getSecurityManager, ClassSecurityInfo from AccessControl import getSecurityManager, ClassSecurityInfo
class MethodWidget(Widget.TextWidget): class MethodWidget(Widget.TextWidget):
......
...@@ -5,13 +5,14 @@ This file is an adaptation from part of Plone's FormTool.py tool. ...@@ -5,13 +5,14 @@ This file is an adaptation from part of Plone's FormTool.py tool.
It provides a wrapping around Formulator.BasicForm, allowing it It provides a wrapping around Formulator.BasicForm, allowing it
to be created inside a product but used outside it. to be created inside a product but used outside it.
""" """
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 App.class_init import default__class_init__ as InitializeClass
import FormValidationError, BasicForm import FormValidationError, BasicForm
import StandardFields from . import StandardFields
class ProductForm(BasicForm): class ProductForm(BasicForm):
"""Wraps Formulator.BasicForm and provides some convenience methods that """Wraps Formulator.BasicForm and provides some convenience methods that
......
from Form import BasicForm from __future__ import absolute_import
from Field import ZMIField from .Form import BasicForm
from DummyField import fields from .Field import ZMIField
from MethodField import BoundMethod from .DummyField import fields
from .MethodField import BoundMethod
from DateTime import DateTime from DateTime import DateTime
import Validator, Widget from . import Validator, Widget
import OFS import OFS
class StringField(ZMIField): class StringField(ZMIField):
......
from __future__ import absolute_import
import string import string
from DummyField import fields from .DummyField import fields
import Widget, Validator from . import Widget, Validator
from Persistence import Persistent from Persistence import Persistent
import Acquisition import Acquisition
from Field import ZMIField from .Field import ZMIField
from AccessControl import getSecurityManager from AccessControl import getSecurityManager
class TALESWidget(Widget.TextWidget): class TALESWidget(Widget.TextWidget):
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import
import re import re
import PatternChecker from . import PatternChecker
from DummyField import fields from .DummyField import fields
from DateTime import DateTime from DateTime import DateTime
from threading import Thread from threading import Thread
from urllib import urlopen from urllib import urlopen
from urlparse import urljoin from urlparse import urljoin
from Errors import ValidationError from .Errors import ValidationError
from DateTime.DateTime import DateError, TimeError from DateTime.DateTime import DateError, TimeError
import unicodedata import unicodedata
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import
import string import string
from DummyField import fields from .DummyField import fields
from DocumentTemplate.DT_Util import html_quote from DocumentTemplate.DT_Util import html_quote
from DateTime import DateTime, Timezones from DateTime import DateTime, Timezones
from cgi import escape from cgi import escape
......
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import XMLObjects from __future__ import absolute_import
# -*- coding: utf-8 -*-
from . import XMLObjects
from Products.Formulator.TALESField import TALESMethod from Products.Formulator.TALESField import TALESMethod
from Products.Formulator.MethodField import Method from Products.Formulator.MethodField import Method
......
import Form from __future__ import absolute_import
import StandardFields, HelperFields from . import Form
from FieldRegistry import FieldRegistry from . import StandardFields, HelperFields
import Errors from .FieldRegistry import FieldRegistry
from . import Errors
from Products.PythonScripts.Utility import allow_module from Products.PythonScripts.Utility import allow_module
try: try:
...@@ -12,7 +13,7 @@ try: ...@@ -12,7 +13,7 @@ try:
except ImportError: except ImportError:
pass pass
else: else:
import FSForm from . import FSForm
# Allow Errors to be imported TTW # Allow Errors to be imported TTW
allow_module('Products.Formulator.Errors') allow_module('Products.Formulator.Errors')
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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