[PATCH] python: Fix database.add_message

Dylan Baker dylan at pnwbakers.com
Tue Sep 12 08:31:10 PDT 2017


Quoting David Bremner (2017-09-11 18:58:31)
> David Bremner <david at tethera.net> writes:
> 
> > Dylan Baker <dylan at pnwbakers.com> writes:
> >
> >> b10ce6bc23002d48916b1b2f375480e7540e3164 introduced a new index_file
> >> method as a replacement for add_message. It helpfully made add_message
> >> an alias for index_file, unfortunately it got the signature wrong by
> >> explicitly passing self as an argument.
> >>
> >> cc: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
> >
> > Thanks. We have another version that I was about to commit
> >
> > https://www.mail-archive.com/notmuch@notmuchmail.org/msg45038.html
> >
> > The only difference is that Gaute (more or less by request) added a
> > deprecation warning.  I don't really know how warnings in python work,
> > does that sound sensible?
> 
> Oof. Two minutes of internet search reveal that DeprecationWarnings are
> ignored by default, so that should be OK.
> 
> d

I'd still add the deprecation warning. IIRC some of the linters have a mode to
check for deprecation warnings.

Dylan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20170912/c0bda75b/attachment-0001.sig>


More information about the notmuch mailing list