From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 1C67F6DE0927 for ; Wed, 30 Aug 2017 00:38:43 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: 0.488 X-Spam-Level: X-Spam-Status: No, score=0.488 tagged_above=-999 required=5 tests=[AWL=-0.164, SPF_NEUTRAL=0.652] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hcttqwHmQa1S for ; Wed, 30 Aug 2017 00:38:41 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id BF4D46DE00DB for ; Wed, 30 Aug 2017 00:38:39 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 524B510008D; Wed, 30 Aug 2017 10:38:27 +0300 (EEST) From: Tomi Ollila To: Gaute Hope , notmuch@notmuchmail.org Subject: Re: [PATCH] python: deprecated add_message calls index_file correctly and returns result In-Reply-To: <1504075328.m1yc56xkxz.astroid@strange.none> References: <20170828073923.31442-1-eg@gaute.vetsj.com> <1504075328.m1yc56xkxz.astroid@strange.none> User-Agent: Notmuch/0.25+52~ga6cef81 (https://notmuchmail.org) Emacs/25.2.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Aug 2017 07:38:43 -0000 On Wed, Aug 30 2017, Gaute Hope wrote: > Tomi Ollila writes on august 30, 2017 0:00: >> On Mon, Aug 28 2017, Gaute Hope wrote: >> >>> The deprecated Database.add_message now calls the new index_file with >>> correct number of arguments (without an extra `self`), and returns the >>> tuple from index_file - as it used to do before. >> >> Instead of this change, should we just dump the whole function... >> >> ... although this looks good what message are we giving by committing >> changes to deprecated functions (unless this is not deprecated enough ;) > > Ok.. would that not be an argument against keeping any deprecated > functions? Then n_d_add_message should perhaps be removed as well. > > It would be a good idea to use `warnings` and `DeprecationWarning` here. > > This deprecation-function wrapper is flawed though: the function > signature is changed from the original, and it does not correctly call > the new function. It is not valid python code. > > Original change: id:20170817231426.9627-2-dkg@fifthhorseman.net Thanks for that information. Perhaps it is just simplest and least effort taking action to apply that change of yours id:20170828073923.31442-1-eg@gaute.vetsj.com (and it makes some users happier for the time being) Tomi > > Regards, Gaute > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch