[PATCH 1/1] python: Fix method name in docs

2017-12-23 Thread l-m-h
Fix a method rename in the docs that was overlooked in 3444c731d27fd42bbbdaae00af6ca48b4525b03b. --- bindings/python/docs/source/database.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/docs/source/database.rst b/bindings/python/docs/source/database.rst ind

[PATCH 0/1] Rename get_config_list to get_configs

2017-12-23 Thread l-m-h
Sorry I overlooked that. Patch coming right up. Lucas Hoffmann (1): python: Fix method name in docs bindings/python/docs/source/database.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.15.1 ___ notmuch mailing list notmuch@notmuchma

[PATCH 6/6] test: Add test to unset config items with the python bindings

2017-12-07 Thread l-m-h
--- test/T390-python.sh | 13 + 1 file changed, 13 insertions(+) diff --git a/test/T390-python.sh b/test/T390-python.sh index c6f395e4..312d61e8 100755 --- a/test/T390-python.sh +++ b/test/T390-python.sh @@ -142,4 +142,17 @@ cat <<'EOF' >EXPECTED EOF test_expect_equal_file EXPECTED

[PATCH 2/6] python: add default arg to get_config_list

2017-12-07 Thread l-m-h
It makes the function a little more intuitive to use and does not diverge much from the original function signature. Also an example is added to the docstring. --- bindings/python/notmuch/database.py | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/bindings/pyth

[PATCH 5/6] python: Rename get_config_list to get_configs

2017-12-07 Thread l-m-h
The old name has a bit of a feeling of hungarian notation. Also many generators in the core are named with the suffix "s" to indicate iterables: dict.items, dict.keys for example. --- bindings/python/notmuch/database.py | 18 ++ test/T390-python.sh | 12 ++

[PATCH 1/6] python: add bindings to access config

2017-12-07 Thread l-m-h
The C functions notmuch_database_get_config, notmuch_database_get_config_list and notmuch_database_set_config are part of the official C bindings. So there should also be some python bindings for them. Also they are the only way to access the named queries introduced in b9bf3f44. The interface

[PATCH 4/6] test: Add tests for new python bindings

2017-12-07 Thread l-m-h
The tests where adopted from the tests for the corresponding C functions in test/T590-libconfig.sh. --- test/T390-python.sh | 68 + 1 file changed, 68 insertions(+) diff --git a/test/T390-python.sh b/test/T390-python.sh index a93a7f34..725a00c9

[PATCH 3/6] python: turn get_config_list into a generator

2017-12-07 Thread l-m-h
This mimics the behaviour of the underlying C function more closely as it also does not store all values in memory. --- bindings/python/notmuch/database.py | 30 -- 1 file changed, 20 insertions(+), 10 deletions(-) diff --git a/bindings/python/notmuch/database.py b/bi

[PATCH 0/6] python: add bindings for notmuch_database_get_config{, _list}

2017-12-07 Thread l-m-h
Comming back after a long time (sorry for the wait). I now changed the binding for notmuch_database_get_config_list into a generator. It is called get_configs in the python bindings (the "s" should indicate the iterable/generator nature like for dict.items or dict.keys). Tests and the set_config

[PATCH 2/2] python: add convenience function to get named queries

2017-06-04 Thread l-m-h
--- bindings/python/notmuch/database.py | 7 +++ 1 file changed, 7 insertions(+) diff --git a/bindings/python/notmuch/database.py b/bindings/python/notmuch/database.py index 9d7737b2..1fd312dd 100644 --- a/bindings/python/notmuch/database.py +++ b/bindings/python/notmuch/database.py @@ -709,3

[PATCH 1/2] python: add bindings for notmuch_database_get_config{, _list}

2017-06-04 Thread l-m-h
--- bindings/python/docs/source/database.rst | 4 ++ bindings/python/notmuch/database.py | 85 bindings/python/notmuch/globals.py | 5 ++ 3 files changed, 94 insertions(+) diff --git a/bindings/python/docs/source/database.rst b/bindings/python/docs/so