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


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

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

Started byVinay Sajip <vinay_sajip@yahoo.co.uk>
First post2011-10-26 14:51 +0000
Last post2011-10-26 14:51 +0000
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. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2011-10-26 14:51 +0000

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

FromVinay Sajip <vinay_sajip@yahoo.co.uk>
Date2011-10-26 14:51 +0000
SubjectRe: logging: warn() methods and function to be deprecated.
Message-ID<mailman.2230.1319640702.27778.python-list@python.org>
Mike C. Fletcher <mcfletch <at> vrplumber.com> writes:

> More: an undocumented entry point is not "deprecated" because, after
> all, it shows up in PyDoc as a regular method.

Deprecated methods also show up in PyDoc. Of course, if the deprecation is
mentioned in the docstring, users would see this - but if it isn't, they
wouldn't know until they got a DeprecationWarning.

> 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

That doesn't sound like a good usage pattern to me, especially as loggers have a
log method which takes the logging level. There shouldn't be any need to pass a
bound method around.

Regards,

Vinay Sajip

[toc] | [standalone]


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


csiph-web