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 1A7B06DE0927 for ; Tue, 29 Aug 2017 15:00:22 -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 Kc7XYKPuz5kL for ; Tue, 29 Aug 2017 15:00:21 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by arlo.cworth.org (Postfix) with ESMTP id 33CC36DE00DB for ; Tue, 29 Aug 2017 15:00:21 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id 9982310008D; Wed, 30 Aug 2017 01:00:16 +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: <20170828073923.31442-1-eg@gaute.vetsj.com> References: <20170828073923.31442-1-eg@gaute.vetsj.com> 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: Tue, 29 Aug 2017 22:00:22 -0000 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 ;) Tomi > --- > bindings/python/notmuch/database.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py > index a2c025eb..6199f58b 100644 > --- a/bindings/python/notmuch/database.py > +++ b/bindings/python/notmuch/database.py > @@ -471,7 +471,7 @@ class Database(object): > def add_message(self, filename, sync_maildir_flags=False): > """Deprecated alias for :meth:`index_file` > """ > - self.index_file(self, filename, sync_maildir_flags=sync_maildir_flags) > + return self.index_file(filename, sync_maildir_flags=sync_maildir_flags) > > _remove_message = nmlib.notmuch_database_remove_message > _remove_message.argtypes = [NotmuchDatabaseP, c_char_p] > -- > 2.14.1 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > https://notmuchmail.org/mailman/listinfo/notmuch