Feature or enhancement
Proposal:
DictConfigurator.configure_formatter() and configure_handler() contain workarounds for old configurations
|
#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) |
|
config['fmt'] = config.pop('format') |
|
config['()'] = factory |
|
result = self.configure_custom(config) |
|
if "'stream'" not in str(te): |
|
raise |
|
#The argument name changed from strm to stream |
|
#Retry with old name. |
|
#This is so that code can be used with older Python versions |
|
#(e.g. by Django) |
|
kwargs['strm'] = kwargs.pop('stream') |
|
result = factory(**kwargs) |
Django doesn't use fmt and strm for many years. I think both can be deprecated and removed.
I'd like to prepare a patch, if accepted.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
Feature or enhancement
Proposal:
DictConfigurator.configure_formatter()andconfigure_handler()contain workarounds for old configurationscpython/Lib/logging/config.py
Lines 670 to 676 in bcccf1f
cpython/Lib/logging/config.py
Lines 844 to 851 in bcccf1f
Django doesn't use
fmtandstrmfor many years. I think both can be deprecated and removed.I'd like to prepare a patch, if accepted.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response
Linked PRs
fmtretry. #115303