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


Groups > comp.lang.python > #15003

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

From Vinay Sajip <vinay_sajip@yahoo.co.uk>
Subject Re: logging: warn() methods and function to be deprecated.
Date 2011-10-26 14:51 +0000
References (1 earlier) <4EA4A65F.2090205@gmail.com> <1319444908.73851.YahooMailNeo@web25801.mail.ukl.yahoo.com> <4EA5787F.1050906@vrplumber.com> <loom.20111026T110624-94@post.gmane.org> <4EA80497.9050600@vrplumber.com>
Newsgroups comp.lang.python
Message-ID <mailman.2230.1319640702.27778.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: logging: warn() methods and function to be deprecated. Vinay Sajip <vinay_sajip@yahoo.co.uk> - 2011-10-26 14:51 +0000

csiph-web