Skip to content

Commit

Permalink
Replace deprecated logging.warn with logging.warning (#10592)
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Jun 25, 2022
1 parent 8525343 commit 20f52d9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions sphinx/ext/extlinks.py
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion sphinx/registry.py
Expand Up @@ -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:
Expand Down

0 comments on commit 20f52d9

Please sign in to comment.