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


Python logger.deprecated方法代码示例

本文整理汇总了Python中pip.log.logger.deprecated方法的典型用法代码示例。如果您正苦于以下问题:Python logger.deprecated方法的具体用法?Python logger.deprecated怎么用?Python logger.deprecated使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pip.log.logger的用法示例。


在下文中一共展示了logger.deprecated方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: add_dependency_links

# 需要导入模块: from pip.log import logger [as 别名]
# 或者: from pip.log.logger import deprecated [as 别名]
def add_dependency_links(self, links):
        ## FIXME: this shouldn't be global list this, it should only
        ## apply to requirements of the package that specifies the
        ## dependency_links value
        ## FIXME: also, we should track comes_from (i.e., use Link)
        if self.process_dependency_links:
            if not self._have_warned_dependency_links:
                logger.deprecated(
                    "1.6",
                    "Dependency Links processing has been deprecated with an "
                    "accelerated time schedule and will be removed in pip 1.6",
                )
                self._have_warned_dependency_links = True
            self.dependency_links.extend(links) 
开发者ID:sugarguo,项目名称:Flask_Blog,代码行数:16,代码来源:index.py

示例2: run

# 需要导入模块: from pip.log import logger [as 别名]
# 或者: from pip.log.logger import deprecated [as 别名]
def run(self, options, args):

        logger.deprecated('1.7', "DEPRECATION: 'pip zip' and 'pip unzip` are deprecated, and will be removed in a future release.")

        self.select_paths = options.paths
        self.simulate = options.simulate
        if options.list:
            return self.list(options, args)
        if not args:
            raise InstallationError(
                'You must give at least one package to zip or unzip')
        packages = []
        for arg in args:
            module_name, filename = self.find_package(arg)
            if options.unzip and os.path.isdir(filename):
                raise InstallationError(
                    'The module %s (in %s) is not a zip file; cannot be unzipped'
                    % (module_name, filename))
            elif not options.unzip and not os.path.isdir(filename):
                raise InstallationError(
                    'The module %s (in %s) is not a directory; cannot be zipped'
                    % (module_name, filename))
            packages.append((module_name, filename))
        last_status = None
        for module_name, filename in packages:
            if options.unzip:
                last_status = self.unzip_package(module_name, filename)
            else:
                last_status = self.zip_package(module_name, filename, options.no_pyc)
        return last_status 
开发者ID:sugarguo,项目名称:Flask_Blog,代码行数:32,代码来源:zip.py

示例3: run

# 需要导入模块: from pip.log import logger [as 别名]
# 或者: from pip.log.logger import deprecated [as 别名]
def run(self, options, args):

        logger.deprecated('1.6', "DEPRECATION: 'pip bundle' and support for installing from *.pybundle files is deprecated. "
                    "See https://github.com/pypa/pip/pull/1046")

        if not args:
            raise InstallationError('You must give a bundle filename')
        # We have to get everything when creating a bundle:
        options.ignore_installed = True
        logger.notify('Putting temporary build files in %s and source/develop files in %s'
                      % (display_path(options.build_dir), display_path(options.src_dir)))
        self.bundle_filename = args.pop(0)
        requirement_set = super(BundleCommand, self).run(options, args)
        return requirement_set 
开发者ID:sugarguo,项目名称:Flask_Blog,代码行数:16,代码来源:bundle.py


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