Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #14922 > unrolled thread

Re: logging: warn() methods and function to be deprecated.

Started by"Mike C. Fletcher" <mcfletch@vrplumber.com>
First post2011-10-24 10:38 -0400
Last post2011-10-24 10:38 -0400
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: logging: warn() methods and function to be deprecated. "Mike C. Fletcher" <mcfletch@vrplumber.com> - 2011-10-24 10:38 -0400

#14922 — Re: logging: warn() methods and function to be deprecated.

From"Mike C. Fletcher" <mcfletch@vrplumber.com>
Date2011-10-24 10:38 -0400
SubjectRe: logging: warn() methods and function to be deprecated.
Message-ID<mailman.2179.1319467505.27778.python-list@python.org>
On 11-10-24 04:28 AM, Vinay Sajip wrote:
>> 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.
> Okay, but it's easy enough to change, and people are getting a reasonable amount of time to deal with it.
I'd have to echo Mark's sentiment here.  There is a *lot* of (fairly
old) code around that uses .warn, and I'd wager even a lot of new code
written by old programmers (such as myself) that uses it.  Breaking it
to avoid having an undocumented method seems wrong; suggest just adding
documentation:

    "logger.warn(...) -- an alias to logger.warning provided for
backward compatibility"

>> Is there still a chance to reconsider?
> I'm not dogmatic about things like this; warn() is just a hangover from a long time ago and bit of a nit, that's all. I suppose I should have removed it when 3.0 was released, but it went under my radar at that time.
>
> Hence my post here, to get feedback from logging users about this proposed change.
I actually consider .warning() a nit :) .  After all, it's 3 extra
characters :) , and *who* actually reads documentation instead of just
poking around and finding the shortest-named method in the instance?

Anyway, I personally don't see this as worth the breakage.

Just my $0.02,
Mike

-- 
________________________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://www.vrplumber.com
  http://blog.vrplumber.com

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web