def get_soup(context, soup_name): # BBB if type(context) == str: from zope.deferredimport import deprecated deprecated("Signature order switched. Now: context, soup_name") soup_name, context = context, soup_name return Soup(soup_name, context)
############################################################################## # # Copyright (c) 2004, 2005 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from zope.deferredimport import deprecated deprecated("Please import from OFS.absoluteurl", AbsoluteURL = 'OFS.absoluteurl:AbsoluteURL', OFSTraversableAbsoluteURL = 'OFS.absoluteurl:OFSTraversableAbsoluteURL', RootAbsoluteURL = 'OFS.absoluteurl:RootAbsoluteURL', )
# -*- coding: utf-8 -*- from zope.deferredimport import deprecated deprecated( "Please import from plone.folder.nogopip", GopipIndex='plone.folder.nogopip:GopipIndex', manage_addGopipForm='plone.folder.nogopip:manage_addGopipForm', manage_addGopipIndex='plone.folder.nogopip:manage_addGopipIndex', )
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from zope.deferredimport import deprecated # BBB Zope 5.0 deprecated( 'Please import from ZServer.Zope2.Startup.zopectl', _ignoreSIGCHLD='ZServer.Zope2.Startup.zopectl:_ignoreSIGCHLD', main='ZServer.Zope2.Startup.zopectl:main', quote_command='ZServer.Zope2.Startup.zopectl:quote_command', run='ZServer.Zope2.Startup.zopectl:run', string_list='ZServer.Zope2.Startup.zopectl:string_list', WIN='ZServer.Zope2.Startup.zopectl:WIN', ZopeCmd='ZServer.Zope2.Startup.zopectl:ZopeCmd', ZopeCtlOptions='ZServer.Zope2.Startup.zopectl:ZopeCtlOptions', )
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## import os import xml.sax from ZConfig.loader import ConfigLoader, SchemaLoader from ZConfig.schema import SchemaParser from zope.deferredimport import deprecated # BBB Zope 5.0 _prefix = 'ZServer.Zope2.Startup.options:' deprecated( 'Please import from ZServer.Zope2.Startup.options.', ZopeOptions=_prefix + 'ZopeOptions', ) class ConditionalSchemaParser(SchemaParser): """ A SchemaParser with support for conditionally executing import directives based on a Python import condition. This is similar to ZCML's condition="installed foo" support, shortened to condition="foo". """ def start_import(self, attrs): load_import = True condition = attrs.get('condition', '').strip() if condition: try: __import__(condition)
from zope.deferredimport import deprecated deprecated( "The functionality of AccessControl.User has moved to" " AccessControl.users. Please import from there." " This backward compatibility shim will be removed in AccessControl" " version 6.", BasicUser='******', NullUnrestrictedUser='******', SimpleUser='******', SpecialUser='******', Super='AccessControl.users:UnrestrictedUser', UnrestrictedUser='******', User='******', _remote_user_mode='AccessControl.users:_remote_user_mode', absattr='AccessControl.users:absattr', addr_match='AccessControl.users:addr_match', domainSpecMatch='AccessControl.users:domainSpecMatch', emergency_user='******', host_match='AccessControl.users:host_match', nobody='AccessControl.users:nobody', readUserAccessFile='AccessControl.users:readUserAccessFile', reqattr='AccessControl.users:reqattr', rolejoin='AccessControl.users:rolejoin', system='AccessControl.users:system', ) deprecated( "The standard Zope user folder implementation has moved to" " OFS.userfolder. Please depend on Zope and import from "
def reindexOnRate(obj, event): """This belongs in a plone specific package, though for now it breaks nothing to keep it here""" if getattr(aq_base(obj), 'reindexObject', None) is not None: obj.reindexObject() # BBB: Everything below here is for backwards compat only @implementer(IObjectUserRatedEvent) class ObjectUserRatedEvent(ObjectRatedEvent): """This exists for BBB only""" @implementer(IObjectEditorRatedEvent) class ObjectEditorRatedEvent(ObjectRatedEvent): """This exists for BBB only""" deprecated( 'The rating type specific events have been deprecated ' 'because they are of limited utility. Use the generic rating ' 'event, or fire your own events from custom storage or manager.', ObjectUserRatedEvent=ObjectUserRatedEvent, ObjectEditorRatedEvent=ObjectEditorRatedEvent) reindexOnEditorRate = DeprecatedMethod( reindexOnRate, 'reindexOnEditorRate is no longer ' 'supported, use reindexOnRate')
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## from zope.deferredimport import deprecated deprecated( 'Please import from OFS.Lockable.', LockableItem='OFS.Lockable:LockableItem', wl_isLocked='OFS.Lockable:wl_isLocked', wl_isLockable='OFS.Lockable:wl_isLockable', ) deprecated( 'Please import from zExceptions.', ResourceLockedError='zExceptions:ResourceLockedError', )
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## from zope.deferredimport import deprecated # BBB: Zope 5.0 deprecated( 'Please import from ZPublisher.HTTPRequest', Request='ZPublisher.HTTPRequest:HTTPRequest', )
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## """Shared global data o N.B.: DO NOT IMPORT ANYTHING HERE! This module is just for shared data! """ # BBB imports from zope.deferredimport import deprecated deprecated("import TreeDisplay directly", TreeDisplay = "TreeDisplay", ) deprecated("import from App.Common instead", package_home = 'App.Common:package_home', attrget = 'App.Common:attrget', Dictionary = 'App.Common:Dictionary', ) deprecated("import from Persistence instead", Persistent = 'Persistence:Persistent', PersistentMapping = 'Persistence:PersistentMapping', ) deprecated("import from AccessControl.class_init instead", InitializeClass = 'AccessControl.class_init:InitializeClass',
# BBB from zope.deferredimport import deprecated deprecated("Please import from Zope2.App.schema", Zope2VocabularyRegistry = 'Zope2.App.schema:Zope2VocabularyRegistry', )
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from zope.deferredimport import deprecated # BBB ZCatalog 5.0 deprecated( 'Please import from Products.PluginIndexes.unindex.', _marker='Products.PluginIndexes.unindex:_marker', LOG='Products.PluginIndexes.unindex:LOG', UnIndex='Products.PluginIndexes.unindex:UnIndex', )
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## from zope.deferredimport import deprecated _prefix = 'ZServer.Zope2.utilities.mkzopeinstance:' # BBB Zope 5.0 deprecated( 'Please import from ZServer.Zope2.utilities.mkzopeinstance.', main=_prefix + 'main', usage=_prefix + 'usage', get_skeltarget=_prefix + 'get_skeltarget', get_inituser=_prefix + 'get_inituser', write_inituser=_prefix + 'write_inituser', check_buildout=_prefix + 'check_buildout', get_zope2path=_prefix + 'get_zope2path', )
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from zope.deferredimport import deprecated # BBB Zope 5.0 deprecated( 'Please import from ZServer.Zope2.Startup.utils', lock_file='ZServer.Zope2.Startup.utils:lock_file')
import io import os import traceback from six.moves import UserDict from ZODB.config import ZODBDatabase from zope.deferredimport import deprecated # BBB Zope 5.0 _prefix = 'ZServer.Zope2.Startup.datatypes:' deprecated( 'Please import from ZServer.Zope2.Startup.datatypes.', cgi_environment=_prefix + 'cgi_environment', LoggerFactory=_prefix + 'LoggerFactory', dns_resolver=_prefix + 'dns_resolver', python_dotted_path=_prefix + 'python_dotted_path', zdaemonEnvironDict=_prefix + 'zdaemonEnvironDict', root_config=_prefix + 'root_config', minimalClassFactory=_prefix + 'minimalClassFactory', ) def security_policy_implementation(value): value = value.upper() ok = ('PYTHON', 'C') if value not in ok: raise ValueError("security-policy-implementation must be one of %r" % ok) return value
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from zope.deferredimport import deprecated # pragma: nocover # BBB ZCatalog 5.0 deprecated( 'Please import from Products.ZCatalog.query.', IndexRequestParseError='Products.ZCatalog.query:IndexQueryParseError', parseIndexRequest='Products.ZCatalog.query:IndexQuery', ) # pragma: nocover # BBB ZCatalog 5.0 deprecated( 'Please import from Products.PluginIndexes.cache.', RequestCache='Products.PluginIndexes.cache:RequestCache', ) # pragma: nocover
############################################################################## # # Copyright (c) 2004, 2005 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Five interfaces """ from zope.deferredimport import deprecated deprecated( "Please import from zope.browsermenu.interfaces", IMenuItemType='zope.browsermenu.interfaces:IMenuItemType', )
oldName = Attribute("The old location name for the object.") newParent = Attribute("The new location parent for the object.") newName = Attribute("The new location name for the object.") class IObjectWillBeAddedEvent(IObjectWillBeMovedEvent): """An object will be added to a container.""" class IObjectWillBeRemovedEvent(IObjectWillBeMovedEvent): """An object will be removed from a container""" class IObjectClonedEvent(IObjectEvent): """An object has been cloned (a la Zope 2). This is for Zope 2 compatibility, subscribers should really use IObjectCopiedEvent or IObjectAddedEvent, depending on their use cases. event.object is the copied object, already added to its container. Note that this event is dispatched to all sublocations. """ # BBB Zope 5.0 deprecated( 'Please import from webdav.interfaces.', IFTPAccess='webdav.interfaces:IFTPAccess', )
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## from zope.deferredimport import deprecated # BBB: Zope 5.0 deprecated( 'Please import from ZPublisher.HTTPResponse', Response='ZPublisher.HTTPResponse:HTTPResponse', )
# ############################################################################## """Commonly used utility functions.""" import os import sys from Acquisition import aq_base from Acquisition import aq_parent from zope.deferredimport import deprecated deprecated( 'Please import from zope.datetime.' ' This backwards compatibility import will go away in Zope 6.', weekday_abbr='zope.datetime:weekday_abbr', weekday_full='zope.datetime:weekday_full', monthname='zope.datetime:monthname', iso8601_date='zope.datetime:iso8601_date', rfc850_date='zope.datetime:rfc850_date', rfc1123_date='zope.datetime:rfc1123_date', ) deprecated( 'Please import from os.path.' ' This backwards compatibility import will go away in Zope 6.', realpath='os.path:realpath', ) deprecated( 'Please import time directly.' ' This backwards compatibility import will go away in Zope 6.', time='time',
# BBB from zope.deferredimport import deprecated deprecated( "Please import from Zope2.App.schema", Zope2VocabularyRegistry='Zope2.App.schema:Zope2VocabularyRegistry', )
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from zope.deferredimport import deprecated # BBB Zope 5.0 deprecated('Please import from ZServer.Zope2.Startup.utils', lock_file='ZServer.Zope2.Startup.utils:lock_file')
# # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## """Support for owned objects """ from zope.deferredimport import deprecated # BBB from AccessControl.owner import EditUnowned from AccessControl.owner import EmergencyUserCannotOwn from AccessControl.owner import UnownableOwner from AccessControl.owner import absattr from AccessControl.owner import ownableFilter from AccessControl.owner import ownerInfo deprecated( "The Owned class has moved to OFS.owner. This compatibility " "shim will be removed in AccessControl version 5. Please " "depend on Zope2 and import from OFS.owner or use the " "new minimal Owned class from AccessControl.owner.", Owned='OFS.owner:Owned', )
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Class initialization. """ from zope.deferredimport import deprecated # BBB Zope 5.0 deprecated( 'Please import from AccessControl.Permission.', ApplicationDefaultPermissions=( 'AccessControl.Permission:ApplicationDefaultPermissions'), ) deprecated( 'Please import from AccessControl.class_init.', default__class_init__='AccessControl.class_init:InitializeClass', InitializeClass='AccessControl.class_init:InitializeClass', )
# -*- coding: utf-8 -*- from zope.deferredimport import deprecated deprecated( "Import from new module 'bda.plone.cart.shipping' instead", Shippings="bda.plone.cart.shipping:Shippings", Shipping="bda.plone.cart.shipping:Shipping", NullItemDelivery="bda.plone.cart.shipping:NullItemDelivery", )
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """TaintedString legacy module. """ from zope.deferredimport import deprecated deprecated('ZPublisher.TaintedString will be removed in Zope 2.14. Please ' 'import from AccessControl.tainted instead.', TaintedString = 'AccessControl.tainted:TaintedString', )
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## import sys from zope.deferredimport import deprecated # BBB DocumentTemplate 4.0 deprecated( 'Please import from zope.sequencesort.ssort. ' 'This module will go away in DocumentTemplate 4.0.', SortBy='zope.sequencesort.ssort:SortBy', SortEx='zope.sequencesort.ssort:SortEx', make_sortfunctions='zope.sequencesort.ssort:make_sortfunctions', nocase='zope.sequencesort.ssort:nocase', sort='zope.sequencesort.ssort:sort', ) # only if locale is already imported if 'locale' in sys.modules: # BBB DocumentTemplate 4.0 deprecated( 'Please import from zope.sequencesort.ssort. ' 'This module will go away in DocumentTemplate 4.0.', strcoll_nocase='zope.sequencesort.ssort:strcoll_nocase', ) del sys
from Products.CMFPlone.PloneBatch import Batch from Products.CMFPlone.utils import safe_hasattr from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile from Products.ZCTextIndex.ParseTree import ParseError from zope.component import getMultiAdapter from zope.component import getUtility from zope.deferredimport import deprecated import re import urllib import urlparse logger = getLogger('ftw.solr') deprecated( "This class is moved to another place. " "Please use ftw.solr.viewlets.searchbox.SearchBoxViewlet instead", SearchBoxViewlet='ftw.solr.viewlets.searchbox:SearchBoxViewlet') def prepare_SearchableText(searchstring): if not searchstring: return if not isinstance(searchstring, unicode): searchstring = searchstring.decode('utf-8') # Check https://lucene.apache.org/core/2_9_4/queryparsersyntax.html # Also remove u3000 and single quote, since this was implemented before. # We do not strip the - sign, since the solr default tokenizer can handle # it. return re.sub(ur'[\+\&\|\!\(\)\{\}\[\]\^\"\'\~\*\?\:\,\u3000]+',
# # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## import transaction from zope.deferredimport import deprecated # BBB Zope 5.0 deprecated( 'Please import from Testing.makerequest.', makerequest='Testing.makerequest:makerequest', ) def appcall(func, *args, **kw): '''Calls a function passing 'app' as first argument.''' from .base import app, close app = app() args = (app, ) + args try: return func(*args, **kw) finally: transaction.abort() close(app)
import ZODB from zope.deferredimport import deprecated from zope.event import notify from zope.processlifetime import DatabaseOpened from zope.processlifetime import DatabaseOpenedWithRoot from App.config import getConfiguration import App.ZApplication import OFS.Application import Zope2 # BBB Zope 5.0 deprecated( 'Please import from ZServer.ZPublisher.exceptionhook.', RequestContainer='ZServer.ZPublisher.exceptionhook:RequestContainer', zpublisher_exception_hook=( 'ZServer.ZPublisher.exceptionhook:EXCEPTION_HOOK'), ZPublisherExceptionHook='ZServer.ZPublisher.exceptionhook:ExceptionHook', ) deprecated( 'Please import from ZPublisher.WSGIPublisher.', validated_hook='ZPublisher.WSGIPublisher:validate_user', ) app = None startup_time = asctime() def load_zcml(): # This hook is overriden by ZopeTestCase
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """webdav interfaces. """ from zope.deferredimport import deprecated from zope.interface import Interface from zope.schema import Bool, Tuple from OFS.interfaces import IWriteLock deprecated( 'Please import from OFS.interfaces.', iso8601_date='OFS.interfaces:ILockItem', ) # XXX: might contain non-API methods and outdated comments; # not synced with ZopeBook API Reference; # based on webdav.Resource.Resource class IDAVResource(IWriteLock): """Provide basic WebDAV support for non-collection objects.""" __dav_resource__ = Bool( title=u"Is DAV resource") __http_methods__ = Tuple( title=u"HTTP methods",
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from zope.deferredimport import deprecated # pragma: nocover # BBB ZCatalog 5.0 deprecated( 'Please import from Products.PluginIndexes.util.', safe_callable='Products.PluginIndexes.util:safe_callable', ) # pragma: nocover
# BBB from zope.deferredimport import deprecated deprecated("Please import from Zope2.App.zcml", _context = 'Zope2.App.zcml:_context', _initialized = 'Zope2.App.zcml:_initialized', cleanUp = 'Zope2.App.zcml:cleanUp', load_config = 'Zope2.App.zcml:load_config', load_site = 'Zope2.App.zcml:load_site', load_string = 'Zope2.App.zcml:load_string', )
class IPagesFromDirectoryDirective(IBasicResourceInformation): """Register each file in a skin directory as a page resource """ for_ = GlobalObject(title=u"The interface this view is for.", required=False) module = GlobalObject(title=u"Module", required=True) directory = TextLine( title=u"Directory", description=u"The directory containing the resource data.", required=True) from zope.deferredimport import deprecated deprecated("Please import from OFS.metadirectives", IRegisterPackageDirective = 'OFS.metadirectives:IRegisterPackageDirective', IRegisterClassDirective = 'OFS.metadirectives:IRegisterClassDirective', IDeprecatedManageAddDeleteDirective = \ 'OFS.metadirectives:IDeprecatedManageAddDeleteDirective', ) deprecated( "Please import from zope.configuration.xmlconfig", IInclude='zope.configuration.xmlconfig:IInclude', )
# -*- coding: utf-8 -*- from zope.deferredimport import deprecated from zope.interface import Attribute from zope.interface import Interface deprecated( "Import from Products.CMFPlone instead", IDefaultPage='Products.CMFPlone.interfaces.defaultpage:DefaultPage', ) class INavigationRoot(Interface): """A marker interface for signaling the navigation root. """ class INavigationQueryBuilder(Interface): """An object which returns a catalog query when called, used to construct a navigation tree. """ def __call__(): """Returns a mapping describing a catalog query used to build a navigation structure. """ class INavtreeStrategy(Interface): """An object that is used by buildFolderTree() to determine how to construct a navigation tree.
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## from zope.deferredimport import deprecated # BBB Zope 5.0 deprecated( 'Please import from Zope2.App.ClassFactory.', ClassFactory='Zope2.App.ClassFactory:ClassFactory', )
# -*- coding: utf-8 -*- from zope.deferredimport import deprecated deprecated( "Import from Products.CMFPlone instead", DefaultPage="Products.CMFPlone.browser.defaultpage:DefaultPage", isDefaultPage="Products.CMFPlone.defaultpage:is_default_page", getDefaultPage="Products.CMFPlone.defaultpage:get_default_page", )
# BBB from AccessControl.users import BasicUser from AccessControl.users import NullUnrestrictedUser from AccessControl.users import SimpleUser from AccessControl.users import SpecialUser from AccessControl.users import UnrestrictedUser as Super from AccessControl.users import User from AccessControl.users import _remote_user_mode from AccessControl.users import absattr from AccessControl.users import addr_match from AccessControl.users import domainSpecMatch from AccessControl.users import emergency_user from AccessControl.users import host_match from AccessControl.users import nobody from AccessControl.users import readUserAccessFile from AccessControl.users import reqattr from AccessControl.users import rolejoin from AccessControl.users import system from AccessControl.users import UnrestrictedUser # noqa isort:skip deprecated( "The standard Zope user folder implementation has moved to " "OFS.userfolder. Please depend on Zope2 and import from " "OFS.userfolder or use the new minimal " "user folder classes from AccessControl.userfolder.", BasicUserFolder='OFS.userfolder:BasicUserFolder', manage_addUserFolder='OFS.userfolder:manage_addUserFolder', UserFolder='OFS.userfolder:UserFolder', )
# -*- coding: utf-8 -*- from zope.deferredimport import deprecated from zope.i18nmessageid import MessageFactory deprecated( "Import from new module 'bda.plone.cart.utils' instead", ascur="bda.plone.cart.utils:ascur", get_catalog_brain="bda.plone.cart.utils:get_catalog_brain", get_object_by_uid="bda.plone.cart.utils:get_object_by_uid", safe_str_uuid="bda.plone.cart.utils:safe_str_uuid", ) deprecated( "Import from new module 'bda.plone.cart.cookie' instead", deletecookie="bda.plone.cart.cookie:delete", readcookie="bda.plone.cart.cookie:read", extractitems="bda.plone.cart.cookie:extract_items", ) deprecated( "Import from new module 'bda.plone.cart.cartitem' instead", aggregate_cart_item_count= "bda.plone.cart.cartitem:aggregate_cart_item_count", cart_item_free_shipping="bda.plone.cart.cartitem:cart_item_free_shipping", cart_item_shippable="bda.plone.cart.cartitem:cart_item_shippable", CartItemAvailabilityBase="bda.plone.cart.cartitem:CartItemAvailabilityBase", CartItemDataProviderBase="bda.plone.cart.cartitem:CartItemDataProviderBase", CartItemPreviewAdapterBase= "bda.plone.cart.cartitem:CartItemPreviewAdapterBase", CartItemStateBase="bda.plone.cart.cartitem:CartItemStateBase", get_item_availability="bda.plone.cart.cartitem:get_item_availability", get_item_data_provider="bda.plone.cart.cartitem:get_item_data_provider", get_item_delivery="bda.plone.cart.cartitem:get_item_delivery",
# # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """Five security handling """ from zope.deferredimport import deprecated deprecated("Please import InitializeClass from App.class_init", initializeClass = 'App.class_init:InitializeClass', ) deprecated("Please import from AccessControl.security", CheckerPublicId = 'AccessControl.security:CheckerPublicId', CheckerPrivateId = 'AccessControl.security:CheckerPrivateId', getSecurityInfo = 'AccessControl.security:getSecurityInfo', clearSecurityInfo = 'AccessControl.security:clearSecurityInfo', checkPermission = 'AccessControl.security:checkPermission', FiveSecurityPolicy = 'AccessControl.security:SecurityPolicy', newInteraction = 'AccessControl.security:newInteraction', _getSecurity = 'AccessControl.security:_getSecurity', protectName = 'AccessControl.security:protectName', protectClass = 'AccessControl.security:protectClass', )
import ZODB import Zope2 from AccessControl.SecurityManagement import newSecurityManager from AccessControl.SecurityManagement import noSecurityManager from App.config import getConfiguration from zope.deferredimport import deprecated from zope.event import notify from zope.processlifetime import DatabaseOpened from zope.processlifetime import DatabaseOpenedWithRoot # BBB Zope 5.0 deprecated( 'Please import from ZServer.ZPublisher.exceptionhook.', RequestContainer='ZServer.ZPublisher.exceptionhook:RequestContainer', zpublisher_exception_hook=( 'ZServer.ZPublisher.exceptionhook:EXCEPTION_HOOK'), ZPublisherExceptionHook='ZServer.ZPublisher.exceptionhook:ExceptionHook', ) deprecated( 'Please import from ZPublisher.WSGIPublisher.', validated_hook='ZPublisher.WSGIPublisher:validate_user', ) app = None startup_time = asctime() def load_zcml(): # This hook is overriden by ZopeTestCase
# This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## from zope.deferredimport import deprecated # BBB Zope 5.0 deprecated( 'Please import from ZServer.Zope2.Startup.run', _setconfig='ZServer.Zope2.Startup.run:_setconfig', configure='ZServer.Zope2.Startup.run:configure', run='ZServer.Zope2.Startup.run:run', ) def configure_wsgi(configfile): """ Provide an API which allows scripts to configure Zope before attempting to do 'app = Zope2.app(). Should be used as follows: from Zope2.Startup.run import configure_wsgi; configure_wsgi('/path/to/configfile'); import Zope2; app = Zope2.app() """ import Zope2.Startup starter = Zope2.Startup.get_wsgi_starter() opts = _set_wsgi_config(configfile) starter.setConfiguration(opts.configroot)
""" DCWorkflow product permissions """ from zope.deferredimport import deprecated deprecated( 'Please import from Products.CMFCore.permissions.', AccessContentsInformation= 'Products.CMFCore.permissions:AccessContentsInformation', ManagePortal='Products.CMFCore.permissions:ManagePortal', ModifyPortalContent='Products.CMFCore.permissions:ModifyPortalContent', RequestReview='Products.CMFCore.permissions:RequestReview', ReviewPortalContent='Products.CMFCore.permissions:ReviewPortalContent', View='Products.CMFCore.permissions:View', )
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## """Deprecated - use DTMLMethod """ from zope.deferredimport import deprecated # BBB Zope 5.0 deprecated( 'Please import from OFS.DTMLMethod.', Document='OFS.DTMLMethod:Document', manage_addDocument='OFS.DTMLMethod:manage_addDocument', )
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE. # ############################################################################## """ CMFCore product permissions. """ from AccessControl import Permissions from AccessControl.Permission import addPermission from AccessControl.SecurityInfo import ModuleSecurityInfo from zope.deferredimport import deprecated deprecated('Please use addPermission from AccessControl.Permission.', setDefaultRoles='AccessControl.Permission:addPermission') security = ModuleSecurityInfo('Products.CMFCore.permissions') # # General Zope permissions # security.declarePublic('AccessContentsInformation') # NOQA: flake8: D001 AccessContentsInformation = Permissions.access_contents_information security.declarePublic('ChangePermissions') # NOQA: flake8: D001 ChangePermissions = Permissions.change_permissions security.declarePublic('DeleteObjects') # NOQA: flake8: D001 DeleteObjects = Permissions.delete_objects
manage_zcatalog_entries='Manage ZCatalog Entries' manage_zcatalog_indexes='Manage ZCatalogIndex Entries' manage_properties='Manage properties' manage_users='Manage users' open_close_database_connection='Open/Close Database Connection' open_close_database_connections='Open/Close Database Connections' query_vocabulary='Query Vocabulary' search_zcatalog='Search ZCatalog' take_ownership='Take ownership' test_database_connections='Test Database Connections' undo_changes='Undo changes' use_database_methods='Use Database Methods' use_factories='Use Factories' use_mailhost_services='Use mailhost services' view='View' view_history='View History' view_management_screens='View management screens' webdav_access='WebDAV access' webdav_lock_items='WebDAV Lock items' webdav_unlock_items='WebDAV Unlock items' from zope.deferredimport import deprecated new_loc = 'DocumentTemplate.permissions' deprecated("Please import from %s" % new_loc, change_dtml_documents = '%s:change_dtml_documents' % new_loc, change_dtml_methods = '%s:change_dtml_methods' % new_loc, )
import os from socket import gethostbyaddr from zope.deferredimport import deprecated # BBB Zope 5.0 _prefix = 'ZServer.Zope2.Startup.handlers:' deprecated( 'Please import from ZServer.Zope2.Startup.handlers.', handleConfig=_prefix + 'handleConfig', root_handler=_prefix + 'root_handler', maximum_number_of_session_objects=( _prefix + 'maximum_number_of_session_objects'), session_add_notify_script_path=( _prefix + 'session_add_notify_script_path'), session_delete_notify_script_path=( _prefix + 'session_delete_notify_script_path'), session_timeout_minutes=_prefix + 'session_timeout_minutes', large_file_threshold=_prefix + 'large_file_threshold', max_listen_sockets=_prefix + 'max_listen_sockets', cgi_maxlen=_prefix + 'cgi_maxlen', http_header_max_length=_prefix + 'http_header_max_length', enable_ms_public_header=_prefix + 'enable_ms_public_header', ) def _setenv(name, value): if isinstance(value, str): os.environ[name] = value else: os.environ[name] = repr(value)
############################################################################## # # Copyright (c) 2002 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS # FOR A PARTICULAR PURPOSE # ############################################################################## """Add security system support to Document Templates """ from zope.deferredimport import deprecated deprecated( "Please import from DocumentTemplate.security. This backward " "compatibility shim will be removed in AccessControl version 5.", DTMLSecurityAPI='DocumentTemplate.security:DTMLSecurityAPI', RestrictedDTML='DocumentTemplate.security:RestrictedDTML', )
import os from socket import gethostbyaddr from zope.deferredimport import deprecated # BBB Zope 5.0 _prefix = 'ZServer.Zope2.Startup.handlers:' deprecated( 'Please import from ZServer.Zope2.Startup.handlers.', handleConfig=_prefix + 'handleConfig', root_handler=_prefix + 'root_handler', maximum_number_of_session_objects=(_prefix + 'maximum_number_of_session_objects'), session_add_notify_script_path=(_prefix + 'session_add_notify_script_path'), session_delete_notify_script_path=(_prefix + 'session_delete_notify_script_path'), session_timeout_minutes=_prefix + 'session_timeout_minutes', large_file_threshold=_prefix + 'large_file_threshold', max_listen_sockets=_prefix + 'max_listen_sockets', cgi_maxlen=_prefix + 'cgi_maxlen', http_header_max_length=_prefix + 'http_header_max_length', enable_ms_public_header=_prefix + 'enable_ms_public_header', ) def _setenv(name, value): if isinstance(value, str): os.environ[name] = value else: os.environ[name] = repr(value)