unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* status of the new python bindings
@ 2020-05-07 13:57 Anton Khirnov
  2020-06-02 20:02 ` Floris Bruynooghe
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Khirnov @ 2020-05-07 13:57 UTC (permalink / raw)
  To: Notmuch Mail

Hi,
I've started tinkering with the "new" Python bindings (python-cffi /
python-notmuch2) and have a couple questions/comments about them:

1) What is the logic behind choosing whether something is exported as
a property or as a method? E.g. Database.needs_upgrade is a property,
while Database.revision() is a method. In my own python code, I tend to
use @property for things that are "cheap" - i.e. do not involve
(significant) IO or heavy computation and methods for those that do. But
both of the above attributes involve library calls, presumably(?) of
similar complexity. Would be nice if this was consistent.

2) Atomic transactions are now exported as a context manager, which is
nice and convenient for the usual use cases, but AFAIU does not have the
same power. E.g. my tagging script does the tagging as a single atomic
transaction and has a "dry-run" mode in which it omits the end_atomic()
call, which is documented to throw away all the changes. This seems to
not be possible with the new bindings.
Would it be okay to add bindings for explicitly calling
start/end_atomic()? Or is my approach considered invalid?

3) There seem to be no bindings for notmuch_database_set_config().

4) The setup for building the documentation seems to be missing.

Anything else of note that remains to be implemented?

-- 
Anton Khirnov

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-06-02 20:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07 13:57 status of the new python bindings Anton Khirnov
2020-06-02 20:02 ` Floris Bruynooghe

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).