diff --git a/sphinx/ext/extlinks.py b/sphinx/ext/extlinks.py index 881108b2307..c03cb78ba63 100644 --- a/sphinx/ext/extlinks.py +++ b/sphinx/ext/extlinks.py @@ -93,9 +93,9 @@ def make_link_role(name: str, base_url: str, caption: str) -> RoleFunction: try: base_url % 'dummy' except (TypeError, ValueError): - logger.warn(__('extlinks: Sphinx-6.0 will require base URL to ' - 'contain exactly one \'%s\' and all other \'%\' need ' - 'to be escaped as \'%%\'.')) # RemovedInSphinx60Warning + logger.warning(__('extlinks: Sphinx-6.0 will require base URL to ' + 'contain exactly one \'%s\' and all other \'%\' need ' + 'to be escaped as \'%%\'.')) # RemovedInSphinx60Warning base_url = base_url.replace('%', '%%') + '%s' if caption is not None: try: diff --git a/sphinx/registry.py b/sphinx/registry.py index da892f91bb6..561fba69b74 100644 --- a/sphinx/registry.py +++ b/sphinx/registry.py @@ -396,7 +396,7 @@ def has_latex_package(self, name: str) -> bool: def add_latex_package(self, name: str, options: str, after_hyperref: bool = False) -> None: 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) if after_hyperref: