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

Mike C. Fletcher mcfletch at vrplumber.com
Wed Oct 26 09:01:11 EDT 2011


On 11-10-26 05:12 AM, Vinay Sajip wrote:
> Mike C. Fletcher <mcfletch <at> vrplumber.com> writes:
>
>> 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?
> Readability counts :-) Are you saying there's no need to bother documenting
> stuff ??? ;-)

More: an undocumented entry point is not "deprecated" because, after
all, it shows up in PyDoc as a regular method.
>  
>> Anyway, I personally don't see this as worth the breakage.
>  
> What breakage are we really talking about? Remember, Python 2.x will not change
> in this area - the proposed change is for Python 3.3 and later only, and will
> not be backported :-)
>
> As far as I know, Trac doesn't work with Python 3 anyway. Most of the code out
> there (which Mark found via Google Code Search) is Python 2.x. When porting from
> 2 to 3.3, it's just one extra little thing to deal with - small compared with
> other issues which come up when doing such ports.
Sure, but most of *everything* is Python 2.x, and porting to Python 3.x
is already enough of a pain that key-stone projects like Trac still
aren't there :) .  This isn't going to be easily amenable to
auto-translation via 2to3 (because you generally are calling log.warn()
rather than logging.warning, but sometimes you are doing getattr( log,
log_level ) and then passing that method around a few times), and it
will often fall into the small percentage of untested code in most
projects (coverage is often poor for logging messages in corner cases),
so often won't get caught by test suites.

Not a 3.x user, but expecting to have to be some day in the future,
Mike

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




More information about the Python-list mailing list