summaryrefslogtreecommitdiffstats
path: root/Doc/tools
diff options
context:
space:
mode:
authorAdam Turner <9087854+AA-Turner@users.noreply.github.com>2023-08-06 13:58:00 (GMT)
committerGitHub <noreply@github.com>2023-08-06 13:58:00 (GMT)
commit9564e31cbc95a723f2414537231bc4611b56644f (patch)
treed2cda4ac2f62c7eae3df8046f9ad891af40da391 /Doc/tools
parent3e334ae259bd922733fac14f2ebac6e3dc93a5e1 (diff)
downloadcpython-9564e31cbc95a723f2414537231bc4611b56644f.zip
cpython-9564e31cbc95a723f2414537231bc4611b56644f.tar.gz
cpython-9564e31cbc95a723f2414537231bc4611b56644f.tar.bz2
Do not use deprecated ``logger.warn()`` in pyspecific (#107694)
Diffstat (limited to 'Doc/tools')
-rw-r--r--Doc/tools/extensions/pyspecific.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/tools/extensions/pyspecific.py b/Doc/tools/extensions/pyspecific.py
index 765e638..3cf4d23 100644
--- a/Doc/tools/extensions/pyspecific.py
+++ b/Doc/tools/extensions/pyspecific.py
@@ -179,7 +179,7 @@ class Availability(SphinxDirective):
if unknown:
cls = type(self)
logger = logging.getLogger(cls.__qualname__)
- logger.warn(
+ logger.warning(
f"Unknown platform(s) or syntax '{' '.join(sorted(unknown))}' "
f"in '.. availability:: {self.arguments[0]}', see "
f"{__file__}:{cls.__qualname__}.known_platforms for a set "
@@ -266,7 +266,7 @@ class AuditEvent(Directive):
info = env.all_audit_events.setdefault(name, new_info)
if info is not new_info:
if not self._do_args_match(info['args'], new_info['args']):
- self.logger.warn(
+ self.logger.warning(
"Mismatched arguments for audit-event {}: {!r} != {!r}"
.format(name, info['args'], new_info['args'])
)
@@ -542,7 +542,7 @@ class PydocTopicsBuilder(Builder):
'building topics... ',
length=len(pydoc_topic_labels)):
if label not in self.env.domaindata['std']['labels']:
- self.env.logger.warn('label %r not in documentation' % label)
+ self.env.logger.warning(f'label {label!r} not in documentation')
continue
docname, labelid, sectname = self.env.domaindata['std']['labels'][label]
doctree = self.env.get_and_resolve_doctree(docname, self)