From d823c235495e69fb4c1286b4ed751731bb31bda9 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Tue, 13 Feb 2024 09:47:40 +0100 Subject: gh-115032: Update DictConfigurator.configure_formatter() comment about `fmt` retry. (GH-115303) --- Lib/logging/config.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Lib/logging/config.py b/Lib/logging/config.py index de06090..ea37dd7 100644 --- a/Lib/logging/config.py +++ b/Lib/logging/config.py @@ -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) -- cgit v0.12