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

Gaute Hope eg at gaute.vetsj.com
Tue Aug 29 23:55:57 PDT 2017


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 at fifthhorseman.net

Regards, Gaute



More information about the notmuch mailing list