]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-115032: Update DictConfigurator.configure_formatter() comment about `fmt` retry...
authorMariusz Felisiak <felisiak.mariusz@gmail.com>
Tue, 13 Feb 2024 08:47:40 +0000 (09:47 +0100)
committerGitHub <noreply@github.com>
Tue, 13 Feb 2024 08:47:40 +0000 (08:47 +0000)
Lib/logging/config.py

index de06090942d9658f4a37c4e7f3b5984ccde54b45..ea37dd7544564a2406f880ec9f131688fea14336 100644 (file)
@@ -667,10 +667,9 @@ class DictConfigurator(BaseConfigurator):
             except TypeError as te:
                 if "'format'" not in str(te):
                     raise
-                #Name of parameter changed from fmt to format.
-                #Retry with old name.
-                #This is so that code can be used with older Python versions
-                #(e.g. by Django)
+                # logging.Formatter and its subclasses expect the `fmt`
+                # parameter instead of `format`. Retry passing configuration
+                # with `fmt`.
                 config['fmt'] = config.pop('format')
                 config['()'] = factory
                 result = self.configure_custom(config)