https://github.com/python/cpython/commit/d823c235495e69fb4c1286b4ed751731bb31bda9
commit: d823c235495e69fb4c1286b4ed751731bb31bda9
branch: main
author: Mariusz Felisiak <[email protected]>
committer: vsajip <[email protected]>
date: 2024-02-13T08:47:40Z
summary:
gh-115032: Update DictConfigurator.configure_formatter() comment about `fmt`
retry. (GH-115303)
files:
M Lib/logging/config.py
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index de06090942d965..ea37dd7544564a 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -667,10 +667,9 @@ def configure_formatter(self, config):
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)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]