Replace deprecated logging.warn with logging.warning (#10592)

This commit is contained in:
Hugo van Kemenade 2022-06-25 14:31:11 +03:00 committed by GitHub
parent 852534312e
commit 20f52d9fa5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -93,7 +93,7 @@ def make_link_role(name: str, base_url: str, caption: str) -> RoleFunction:
try: try:
base_url % 'dummy' base_url % 'dummy'
except (TypeError, ValueError): except (TypeError, ValueError):
logger.warn(__('extlinks: Sphinx-6.0 will require base URL to ' logger.warning(__('extlinks: Sphinx-6.0 will require base URL to '
'contain exactly one \'%s\' and all other \'%\' need ' 'contain exactly one \'%s\' and all other \'%\' need '
'to be escaped as \'%%\'.')) # RemovedInSphinx60Warning 'to be escaped as \'%%\'.')) # RemovedInSphinx60Warning
base_url = base_url.replace('%', '%%') + '%s' base_url = base_url.replace('%', '%%') + '%s'

View File

@ -396,7 +396,7 @@ class SphinxComponentRegistry:
def add_latex_package(self, name: str, options: str, after_hyperref: bool = False) -> None: def add_latex_package(self, name: str, options: str, after_hyperref: bool = False) -> None:
if self.has_latex_package(name): if self.has_latex_package(name):
logger.warn("latex package '%s' already included" % name) logger.warning("latex package '%s' already included", name)
logger.debug('[app] adding latex package: %r', name) logger.debug('[app] adding latex package: %r', name)
if after_hyperref: if after_hyperref: