Re: [PATCH] use notmuch_database_open_verbose

Subject: Re: [PATCH] use notmuch_database_open_verbose

Date: Sat, 12 Mar 2016 12:26:45 -0400

To: Patrick Totzke, notmuch@notmuchmail.org

Cc:

From: David Bremner


Patrick Totzke <patricktotzke@gmail.com> writes:

> ... instead of the deprecated notmuch_database_open

Perhaps it should be formally deprecated, but unlike several other
functions, it isn't.

> when opening the database in notmuch.database.Database.open.
> This prevents the library to print Xapian exceptions to stderr.
> ---
>  bindings/python/notmuch/database.py | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py
> index f304533..5400338 100644
> --- a/bindings/python/notmuch/database.py
> +++ b/bindings/python/notmuch/database.py
> @@ -86,8 +86,8 @@ class Database(object):
>      _get_version.argtypes = [NotmuchDatabaseP]
>      _get_version.restype = c_uint
>  
> -    """notmuch_database_open"""
> -    _open = nmlib.notmuch_database_open
> +    """notmuch_database_open_verbose"""
> +    _open = nmlib.notmuch_database_open_verbose
>      _open.argtypes = [c_char_p, c_uint, POINTER(NotmuchDatabaseP)]
>      _open.restype = c_uint

I expect you probably want to add the new binding, rather than replacing
the old one. Otherwise updating the bindings will break all bindings
using scripts.

d

Thread: