You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Deprecate old backward compatible shims in configure_formatter()/handler(). #115032
I realise Django doesn't use them any more, but what about other code / users? I wouldn't strongly object to removing them, but there's a chance that any such change might need to be reverted if there are complaints that it breaks existing code somewhere. And, of course, no backporting of any such change. Perhaps deprecate, but not remove immediately - rather, in line with the usual deprecation cycle. It's just a little wart in the current code, after all.
Perhaps deprecate, but not remove immediately - rather, in line with the usual deprecation cycle.
Yes that's what I was trying to propose. We have an existing and straightforward upgrade path i.e. use format instead of fmt and use stream instead of strm, so it seems fine to deprecate the current workarounds and remove them in 3.15 (I guess 🤔).
It's just a little wart in the current code, after all.
True, but they become an issue when there are dozens of such workarounds ("death by a thousand cuts").
While preparing a patch, I noticed that we can deprecate strm, however, fmt is still needed because config is passed directly to the custom formatters and Formatter except fmt instead of format.
Activity
sobolevn commentedon Feb 7, 2024
cc @vsajip
vsajip commentedon Feb 7, 2024
I realise Django doesn't use them any more, but what about other code / users? I wouldn't strongly object to removing them, but there's a chance that any such change might need to be reverted if there are complaints that it breaks existing code somewhere. And, of course, no backporting of any such change. Perhaps deprecate, but not remove immediately - rather, in line with the usual deprecation cycle. It's just a little wart in the current code, after all.
felixxm commentedon Feb 7, 2024
Yes that's what I was trying to propose. We have an existing and straightforward upgrade path i.e. use
formatinstead offmtand usestreaminstead ofstrm, so it seems fine to deprecate the current workarounds and remove them in 3.15 (I guess 🤔).True, but they become an issue when there are dozens of such workarounds ("death by a thousand cuts").
vsajip commentedon Feb 7, 2024
Well, it's not that bad IMO, but I'll look at a PR that does deprecation.
felixxm commentedon Feb 11, 2024
While preparing a patch, I noticed that we can deprecate
strm, however,fmtis still needed becauseconfigis passed directly to the custom formatters andFormatterexceptfmtinstead offormat.pythongh-115032: Update DictConfigurator.configure_formatter() commen…
pythongh-115032: Deprecate support for custom logging handlers with '…
pythongh-115032: Deprecate support for custom logging handlers with '…
gh-115032: Update DictConfigurator.configure_formatter() comment abou…
pythongh-115032: Update DictConfigurator.configure_formatter() commen…
pythongh-115032: Deprecate support for custom logging handlers with '…
gh-115032: Deprecate support for custom logging handlers with 'strm' …