当前位置: 首页>>代码示例>>Python>>正文


Python deferredimport.deprecated函数代码示例

本文整理汇总了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)
开发者ID:jean,项目名称:souper,代码行数:7,代码来源:soup.py

示例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')
开发者ID:dhavlik,项目名称:Zope,代码行数:20,代码来源:lock_file.py

示例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',
)
开发者ID:zopefoundation,项目名称:Zope,代码行数:30,代码来源:class_init.py

示例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',
)
开发者ID:dhavlik,项目名称:Zope,代码行数:28,代码来源:zopectl.py

示例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
开发者ID:zopefoundation,项目名称:Zope,代码行数:31,代码来源:startup.py

示例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',
)
开发者ID:dhavlik,项目名称:Zope,代码行数:20,代码来源:ClassFactory.py

示例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',
)
开发者ID:Andyvs,项目名称:TrackMonthlyExpenses,代码行数:21,代码来源:absoluteurl.py

示例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',
)
开发者ID:plone,项目名称:plone.app.folder,代码行数:10,代码来源:nogopip.py

示例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',
)
开发者ID:zopefoundation,项目名称:Zope,代码行数:21,代码来源:Response.py

示例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',
)
开发者ID:zopefoundation,项目名称:ZServer,代码行数:26,代码来源:Lockable.py

示例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',
)
开发者ID:dhavlik,项目名称:Zope,代码行数:20,代码来源:Request.py

示例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',
开发者ID:c0ns0le,项目名称:zenoss-4,代码行数:31,代码来源:__init__.py

示例13: deprecated

# BBB

from zope.deferredimport import deprecated

deprecated("Please import from Zope2.App.schema",
    Zope2VocabularyRegistry = 'Zope2.App.schema:Zope2VocabularyRegistry',
)
开发者ID:Andyvs,项目名称:TrackMonthlyExpenses,代码行数:7,代码来源:schema.py

示例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',
)
开发者ID:eprigorodov,项目名称:Products.ZCatalog,代码行数:22,代码来源:UnIndex.py

示例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',
)
开发者ID:dhavlik,项目名称:Zope,代码行数:28,代码来源:mkzopeinstance.py


注:本文中的zope.deferredimport.deprecated函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。