]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-40836: Add docstring to logging.fatal() and logging.Logger.fatal() (GH-20563)
authorRémi Lapeyre <remi.lapeyre@lenstra.fr>
Mon, 15 Jun 2020 08:03:07 +0000 (10:03 +0200)
committerGitHub <noreply@github.com>
Mon, 15 Jun 2020 08:03:07 +0000 (01:03 -0700)
Automerge-Triggered-By: @vsajip
Lib/logging/__init__.py

index 6d27301a7056e02deece74328c124d99a14fbcaf..1c446fd421650543e773be63c70c4dc902f1eb7a 100644 (file)
@@ -1480,7 +1480,11 @@ class Logger(Filterer):
         if self.isEnabledFor(CRITICAL):
             self._log(CRITICAL, msg, args, **kwargs)
 
-    fatal = critical
+    def fatal(self, msg, *args, **kwargs):
+        """
+        Don't use this method, use critical() instead.
+        """
+        self.critical(msg, *args, **kwargs)
 
     def log(self, level, msg, *args, **kwargs):
         """
@@ -2039,7 +2043,11 @@ def critical(msg, *args, **kwargs):
         basicConfig()
     root.critical(msg, *args, **kwargs)
 
-fatal = critical
+def fatal(msg, *args, **kwargs):
+    """
+    Don't use this function, use critical() instead.
+    """
+    critical(msg, *args, **kwargs)
 
 def error(msg, *args, **kwargs):
     """