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