Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 9564e31

Browse files
authoredAug 6, 2023
Do not use deprecated logger.warn() in pyspecific (python#107694)
1 parent 3e334ae commit 9564e31

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎Doc/tools/extensions/pyspecific.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def parse_platforms(self):
179179
if unknown:
180180
cls = type(self)
181181
logger = logging.getLogger(cls.__qualname__)
182-
logger.warn(
182+
logger.warning(
183183
f"Unknown platform(s) or syntax '{' '.join(sorted(unknown))}' "
184184
f"in '.. availability:: {self.arguments[0]}', see "
185185
f"{__file__}:{cls.__qualname__}.known_platforms for a set "
@@ -266,7 +266,7 @@ def run(self):
266266
info = env.all_audit_events.setdefault(name, new_info)
267267
if info is not new_info:
268268
if not self._do_args_match(info['args'], new_info['args']):
269-
self.logger.warn(
269+
self.logger.warning(
270270
"Mismatched arguments for audit-event {}: {!r} != {!r}"
271271
.format(name, info['args'], new_info['args'])
272272
)
@@ -542,7 +542,7 @@ def write(self, *ignored):
542542
'building topics... ',
543543
length=len(pydoc_topic_labels)):
544544
if label not in self.env.domaindata['std']['labels']:
545-
self.env.logger.warn('label %r not in documentation' % label)
545+
self.env.logger.warning(f'label {label!r} not in documentation')
546546
continue
547547
docname, labelid, sectname = self.env.domaindata['std']['labels'][label]
548548
doctree = self.env.get_and_resolve_doctree(docname, self)

0 commit comments

Comments
 (0)
Please sign in to comment.