當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。