本文整理汇总了Python中zope.deferredimport.deprecated函数的典型用法代码示例。如果您正苦于以下问题:Python deprecated函数的具体用法?Python deprecated怎么用?Python deprecated使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了deprecated函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_soup
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)
示例2: Copyright
##############################################################################
#
# 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')
示例3: Copyright
##############################################################################
#
# 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',
)
示例4: Copyright
##############################################################################
#
# 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',
)
示例5: deprecated
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
示例6: Copyright
##############################################################################
#
# 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',
)
示例7: Copyright
##############################################################################
#
# 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',
)
示例8: deprecated
# -*- 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',
)
示例9: Copyright
##############################################################################
#
# 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',
)
示例10: Copyright
##############################################################################
#
# 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',
)
示例11: Copyright
##############################################################################
#
# 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',
)
示例12: deprecated
# 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',
示例13: deprecated
# BBB
from zope.deferredimport import deprecated
deprecated("Please import from Zope2.App.schema",
Zope2VocabularyRegistry = 'Zope2.App.schema:Zope2VocabularyRegistry',
)
示例14: Copyright
##############################################################################
#
# 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',
)
示例15: Copyright
##############################################################################
#
# 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',
)