gh-105376: Remove logging.Logger.warn() method (#105377)

This commit is contained in:
Victor Stinner 2023-06-06 20:35:51 +02:00 committed by GitHub
parent 221d703498
commit 6c54e5d721
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 9 deletions

View file

@ -1550,11 +1550,6 @@ class Logger(Filterer):
if self.isEnabledFor(WARNING):
self._log(WARNING, msg, args, **kwargs)
def warn(self, msg, *args, **kwargs):
warnings.warn("The 'warn' method is deprecated, "
"use 'warning' instead", DeprecationWarning, 2)
self.warning(msg, *args, **kwargs)
def error(self, msg, *args, **kwargs):
"""
Log 'msg % args' with severity 'ERROR'.