Re: [PATCH] python: deprecated add_message calls index_file correctly and returns result

Subject: Re: [PATCH] python: deprecated add_message calls index_file correctly and returns result

Date: Wed, 30 Aug 2017 01:00:16 +0300

To: Gaute Hope, notmuch@notmuchmail.org

Cc:

From: Tomi Ollila


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
_______________________________________________
notmuch mailing list
notmuch@notmuchmail.org
https://notmuchmail.org/mailman/listinfo/notmuch

Thread: