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


Groups > comp.lang.python > #22211

Re: best way to create warning for obsolete functions and call new one

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!tudelft.nl!txtfeed1.tudelft.nl!multikabel.net!newsfeed20.multikabel.net!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <dan@tombstonezero.net>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.102
X-Spam-Level *
X-Spam-Evidence '*H*': 0.82; '*S*': 0.02; 'users,': 0.05; 'rename': 0.09; 'subject:create': 0.09; 'subject: \n ': 0.16; 'warn': 0.16; 'mon,': 0.18; 'wrote:': 0.21; 'header:In-Reply-To:1': 0.22; '+0200': 0.23; 'quite': 0.26; 'dan': 0.29; 'subject:new': 0.35; 'force': 0.35; 'received:76': 0.35; 'charset:us-ascii': 0.36; 'some': 0.37; 'to:addr:python-list': 0.39; 'to:addr:python.org': 0.40; 'mar': 0.61; 'call': 0.62; '2012': 0.69; 'everybody': 0.72; 'gelonida': 0.84; 'hth,': 0.84; 'subject:warning': 0.91
DKIM-Signature v=1; a=rsa-sha1; c=relaxed; d=tombstonezero.net; h=date:from:to:subject:message-id:in-reply-to:references:mime-version:content-type:content-transfer-encoding; s=key1; bh=OeTfBDKyWVtUTh6EfzZpF2zIq1w=; b=GcjjB7Tv9oFnaC2FhYi8LV2AigTfiG1UYsraud523ZWmuVQpYgYalIBLZ5/Bkg1QmaoED8Wg/zXJBSYn0jNbAw==
DomainKey-Signature a=rsa-sha1; c=nofws; d=tombstonezero.net; q=dns; s=key1; b=rCEgK7cMAzKQ9gRqip/xRp1sdqNyXDiltN4UnX/qEoSKVlzsurxpDj/XU5fm09t5RTB6UAA7AD1VlRwlDgWWYw==
X-Virus-Scanned Debian amavisd-new at 5013.mail.vm.your-site.com
Date Mon, 26 Mar 2012 17:24:40 -0400
From Dan Sommers <dan@tombstonezero.net>
To python-list@python.org
Subject Re: best way to create warning for obsolete functions and call new one
In-Reply-To <jkqjd4$1cp$1@dough.gmane.org>
References <jkqjd4$1cp$1@dough.gmane.org>
X-Mailer Claws Mail 3.8.0 (GTK+ 2.24.10; x86_64-pc-linux-gnu)
Mime-Version 1.0
Content-Type text/plain; charset=US-ASCII
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1019.1332797092.3037.python-list@python.org> (permalink)
Lines 12
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1332797092 news.xs4all.nl 6961 [2001:888:2000:d::a6]:60846
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:22211

Show key headers only | View raw


On Mon, 26 Mar 2012 22:26:11 +0200
Gelonida N <gelonida@gmail.com> wrote:

> As these modules are used by quite some projects and as I do not want
> to force everybody to rename immediately I just want to warn users,
> that they call functions, that have been renamed and that will be
> obsoleted.

You want a  DeprecationWarning.

HTH,
Dan

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


Thread

Re: best way to create warning for obsolete functions and call new one Dan Sommers <dan@tombstonezero.net> - 2012-03-26 17:24 -0400

csiph-web