logging: warn() methods and function to be deprecated.
Mark Hammond
skippy.hammond at gmail.com
Sun Oct 23 19:42:23 EDT 2011
On 22/10/2011 11:09 PM, Vinay Sajip wrote:
> In response to an issue (#13235) raised on the Python bug tracker, I'm going to
> deprecate the warn() methods in the Logger and LoggerAdapter classes in the
> stdlib logging package, as well the module-level warn() function.
>
> The warn() variants were synonyms for the warning() methods and function, and a
> holdover from before the time that logging was added to Python.They were not
> documented; it's probably time to retire them, so I've added a
> DeprecationWarning to appear in 3.3, and they'll be completely removed in 3.4
> (along with the WARN synonym for WARNING). With this change, all the logging
> levels are adjectives which apply to the logged message: DEBUG, INFO, WARNING,
> ERROR and CRITICAL.
>
> I don't believe the WARN/warn variants were used much, if at all - but this is
> just a heads up for anyone who might have used them.
I think that is a real shame - it seems to be gratuitous breakage for
almost zero benefit. That issue shows that Trac makes heavy use of
.warn, I've use .warn almost exclusively for many years, and
code.google.com shows it is used extensively in the wild.
Is there still a chance to reconsider?
Mark
More information about the Python-list
mailing list