summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMariusz Felisiak <felisiak.mariusz@gmail.com>2024-02-13 08:47:40 (GMT)
committerGitHub <noreply@github.com>2024-02-13 08:47:40 (GMT)
commitd823c235495e69fb4c1286b4ed751731bb31bda9 (patch)
tree56f8d2a756fb3e4187ba8a77ec32f1793900e0ce
parent0a6e1a4119864bec0247b04a5c99fdd9799cd8eb (diff)
downloadcpython-d823c235495e69fb4c1286b4ed751731bb31bda9.zip
cpython-d823c235495e69fb4c1286b4ed751731bb31bda9.tar.gz
cpython-d823c235495e69fb4c1286b4ed751731bb31bda9.tar.bz2
gh-115032: Update DictConfigurator.configure_formatter() comment about `fmt` retry. (GH-115303)
-rw-r--r--Lib/logging/config.py7
1 files 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)