]> git.notmuchmail.org Git - notmuch/commit
bindings/python-cffi: search for config by default
authorDavid Bremner <david@tethera.net>
Sat, 8 Jan 2022 21:21:43 +0000 (17:21 -0400)
committerDavid Bremner <david@tethera.net>
Sun, 9 Jan 2022 19:16:51 +0000 (15:16 -0400)
commit8b737af28bc377db3e661a5744f3b7479b7ce485
treed229f944b35f60ecc3d0155d06215de10b9bcce1
parent9e7ea628e6bddbd7345d053a3daf14af74896cc2
bindings/python-cffi: search for config by default

The previous (pre-0.34.2) constructor searched for a config file but
only if the database path was not specified, and only to retrieve
database.path. Neither of the available options (CONFIG.SEARCH or
CONFIG.NONE) matches this semantics exactly, but CONFIG.SEARCH causes
less breakage for people who relied on the old behaviour to set their
database.path [1]. Since it also seems like the friendlier option in
the long run, this commit switches to CONFIG.SEARCH as default.

This requires a certain amount of updating the pytest tests, but most
users will actually have a config file, unlike the test environment.

[1]: id:87fsqijx7u.fsf@metapensiero.it
bindings/python-cffi/notmuch2/_database.py
bindings/python-cffi/tests/test_config.py
bindings/python-cffi/tests/test_database.py
bindings/python-cffi/tests/test_tags.py
bindings/python-cffi/tests/test_thread.py