Commit graph

527 commits

Author SHA1 Message Date
David Bremner
51816247d2 version: bump to 0.22 2016-07-19 06:33:37 -03:00
David Bremner
308b44290d version: bump to 0.21.1~rc0
Getting ready for the point release
2016-06-30 17:52:42 +02:00
Daniel Kahn Gillmor
6a833a6e83 Use https instead of http where possible
Many of the external links found in the notmuch source can be resolved
using https instead of http.  This changeset addresses as many as i
could find, without touching the e-mail corpus or expected outputs
found in tests.
2016-06-05 08:32:17 -03:00
Daniel Kahn Gillmor
9b9c265a25 NEWS, python: update pointer to online documentation
Currently, http://packages.python.org/notmuch/ goes through a series
of redirections and ends up pointing to readthedocs.  Since we're
using readthedocs directly anyway, just point to it directly.

readthedocs are also now sensibly using a separate domain
(readthedocs.io) for their hosted documentation as distinct from their
own domain (readthedocs.org), so use the correct tld.
2016-06-05 08:25:22 -03:00
Ludovic LANGE
7e6e23c36e ruby: add bindings for notmuch_database_get_all_tags
The Ruby bindings were missing a way to get all the tags of the
database. Now you should be able to access this with the public
instance method `all_tags` of your database object.

Example of use:
    notmuchdb = Notmuch::Database.new path, { :create => false,
    	:mode => Notmuch::MODE_READ_ONLY }

    my_tags = notmuchdb.all_tags

    my_tags.each { |tag|
      print tag
    }

    my_tags.destroy!

Amended by db: improve error reporting, add test
2016-05-19 08:02:43 -03:00
David Bremner
e6e395435d bump version and NEWS date for 0.22 release 2016-04-26 21:36:53 -03:00
David Bremner
0a58d534a5 version: bump to 0.22~rc1 2016-04-24 18:02:05 -03:00
David Bremner
73334f403c version: bump to 0.22~rc0 2016-04-16 08:44:39 -03:00
Jani Nikula
8a433aad99 bindings: drop build time message on missing ruby dependency
The usual make message on everything being up to date is:

	make: Nothing to be done for 'all'.

However, since

commit d038b93209
Author: David Bremner <david@tethera.net>
Date:   Mon Jun 1 09:08:59 2015 +0200

    build: integrate building ruby bindings into notmuch build process

if one doesn't have the ruby dependencies installed, the message has
been:

	Missing dependency, skipping ruby bindings

Restore the usual behaviour by dropping the message. It's redundant
during build anyway, since the configure script already outputs:

	Checking for ruby development files... No (skipping ruby bindings)
2016-04-16 08:26:40 -03:00
Justus Winter
bd68a862ae python: update the README
Signed-off-by: Justus Winter <justus@gnupg.org>
2016-03-14 20:29:08 +01:00
Daniel Kahn Gillmor
fa0bc2ef91 notmuch.Database.remove_message should raise exception on failure
The notmuch python bindings document that database.remove_message
should raise an exception when the message removal fails, but they
don't actually do it.
2016-02-11 20:41:54 +01:00
Justus Winter
a5c1536d9a python: cleanup imports
Drop unused imports, and avoid warning about unused imports when we
import something on behalf of another module.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2016-01-08 13:58:33 +01:00
Justus Winter
096c600b96 python: Remove {Filenames,Threads}.__len__
Remove the __len__ functions, as they exhaust the iterator, breaking
'list(x)'.

This is a follow-up to 8866a89e.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2016-01-08 13:58:33 +01:00
Justus Winter
e2ecf2b0eb python: update bindings for the new query search API
Use 'notmuch_query_search_{threads,messages}_st' instead of their
deprecated counterpart.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2016-01-08 13:58:33 +01:00
Justus Winter
9ed1eea8b6 python: add new errors
Add support for the new notmuch status codes UNSUPPORTED_OPERATION,
UPGRADE_REQUIRED, and PATH_ERROR.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2016-01-08 13:58:33 +01:00
Justus Winter
e3d34ef0af python: add missing import
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2016-01-08 13:58:33 +01:00
Daniel Kahn Gillmor
87aa5aea56 python: fix argument for filenames_destroy 2016-01-08 12:37:38 +01:00
Daniel Kahn Gillmor
8881a61fe7 python: add notmuch.Database.status_string()
This gives some additional access to debugging information when using
the python bindings.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2015-12-11 17:05:32 +01:00
David Bremner
cd04880d38 version: bump to 0.21 2015-10-29 19:57:30 -03:00
David Bremner
246d540dbe version: bump to 0.21~rc3 2015-10-22 09:19:21 -03:00
David Bremner
34e620b91d version: bump to 0.21~rc2 2015-10-19 07:12:18 -03:00
David Bremner
627efac85e version: bump to 0.21~rc1 2015-10-15 08:24:26 -03:00
David Bremner
e8a828b30d ruby: use new query_search API
These changes should not be too surprising for users because the
routines were already potentially throwing exceptions.
2015-10-05 19:54:12 -03:00
David Bremner
c44db65669 python: update bindings for new count API
Note that any mismatches are not detected until runtime (if at all)
with the python bindings, so tests are crucial
2015-10-05 19:52:32 -03:00
David Bremner
516e196fa1 ruby: use new count API
This change of replacing ignoring errors with exceptions is intended,
and indeed one of the main motivations for the libnotmuch API changes.
2015-10-05 19:51:52 -03:00
David Bremner
8cca886b10 notmuch 0.20.2 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJVjqAqAAoJEPIClx2kp54sTLYL/iemBYQ2TELiIt8WQiFITKm8
 CZdAXUKR75C+Qmh462lRnilbGVzLrYC9opYXUfFH4IUu/1jf4iKYQmd37Qn+cSAG
 p3/SjFbh6FX0FIqxYegjKFByZju47OtAp+BbPMWyOOEXDASOjwmxMAnm5yzm9At/
 xnKV+5nxmN8KqVDvtF/TBtHM9wZ+ASt9yc4ncKgnAaxyWfWeaSTm0EKwTgHwKcKb
 JZy8XvE9J022Y2r7AWUHjdIyaX5/9cQXtVQg8w238Gp/5FazBN+4yu0Py73nN+pB
 nb0M9IzHHHolbQd89RYOVyqsZ/uka6gl60wduW5ILGYgG2So9qRcHMLJIHKDigF8
 e7j5yGDV6JS6Ub/jMiqKVOPpQv1G7euGqeA9PmQI1UvHEiEoy2kEbPdoyuuKJVbM
 QxG56SsTy85Irj/o1PeW0+ScxP1y6sQA5E1/YB1BRcgW1uwA2XkiZ+JC1IcqRFvZ
 ktJxZOIxYqhhYuXTbzd8KL75cvg1cwKVmmgFMunHcg==
 =m+4D
 -----END PGP SIGNATURE-----

Merge tag '0.20.2'

notmuch 0.20.2 release

Conflicts:
	NEWS
2015-06-27 15:29:52 +02:00
David Bremner
c66e0d4bc2 version: update to 0.20.2
As usual, bump python version at same time.
2015-06-27 15:05:31 +02:00
David Bremner
233b5528cd build/ruby: use notmuch configure script values for shared lib
This is supposed to help build on systems like MacOS with different
conventions for naming shared libraries. We have already computed the
relevant names, so doing it again in ruby seems like a bad idea.
2015-06-14 08:23:55 +02:00
David Bremner
53035dafe0 lib, ruby: make use of -Wl,--no-undefined configurable
In particular this is supposed to help build on systems (presumably
using a non-gnu ld) where this flag is not available.
2015-06-13 17:52:48 +02:00
David Bremner
d038b93209 build: integrate building ruby bindings into notmuch build process
Because ruby generates a Makefile, we have to use recursive make.
Because mkmf.rb hardcodes the name Makefile, put our Makefile{.local}
in the parent directory.
2015-06-12 09:12:28 +02:00
David Bremner
dc840338b2 version: bump to 20.1 2015-06-01 21:47:35 +02:00
David Bremner
4bc7fba31b version: bump to 0.20 2015-05-31 11:13:56 +02:00
David Bremner
4f96b5be63 version: bump to 0.20~rc2 2015-05-23 21:03:30 +02:00
David Bremner
36bf31658c python: use absolute import for SOVERSION
Apparently python3 needs this.
2015-05-23 20:59:42 +02:00
David Bremner
fa11a62de0 version: bump to 0.20~rc1 2015-05-04 08:09:43 +02:00
David Bremner
aed5ec4350 python: replace hardcoding of SONAME version
Failing to update this string in globals.py causes failures when the
SONAME changes.  In order to hopefully reduce the number of such
errors, automate the process of setting the SONAME in the python
bindings.
2015-03-08 08:30:36 +01:00
Trevor Jim
05b27ee0dd go: add binding for notmuch_message_get_date 2015-03-08 08:25:44 +01:00
David Bremner
c86353aa9a bindings/ruby: gitignore *.o 2015-01-01 16:47:29 +01:00
David Bremner
a60aa095d7 version: bump to 0.19 2014-11-14 19:35:44 +01:00
David Bremner
61bae7726d bump version to 0.19~rc2 2014-11-09 16:23:58 +01:00
David Bremner
f310e349df version: update to 0.19~rc1
Sync NEWS debian/changelog at the same time, although in those cases it's a downgrade.
2014-11-06 00:07:45 +01:00
David Bremner
f5db7ad7d2 notmuch 0.18.2 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJUS9DZAAoJEPIClx2kp54s604L/0QXEH2twR9qYKvrc2CHFR7e
 9OX1yVx9A/mq5lFk9Inb6xfIJEcnFnAWkSEAkRwMYgL2705fd+No+UnAdC0HxBYo
 1EoabYGbMiVMbGN0+y/6byqq1YmRDKfRvZFF1WneZyugWyX2lYDjQmRW/g5EdKGb
 TZS2RhY4U18QV/L1ZaherO9yy9Ct0XXvxx+Tio6g5Xx4Hn0jEx0SH+B0gXmqDCwj
 fdy/5nQK7H+0NSD8W7y6z2DCd3SZ72gm8pVyScOZ3CvTaE8K9rIE5F2xpF/rtyra
 Gp+ST9i/hCLwV8YnVfMWhajHjXuZamV75vANgSKWdHGZHuIG9i+ocf0cKdbmhDUK
 6GJtnUMsNENbq1emKu/12lpMGZU5XBh4lg1whX9g5QvFQ6S8FcETFuqbaOTLio91
 d9wy/D+QzJZ/gLijQu/cEFi5pCbKCcaHfUeI48VwoORfdpKxIG007k5wDOwpBbAy
 9g7hte1d9cQquwZyDKyt65CicbJEu8v5ROT+81zBbg==
 =wMbd
 -----END PGP SIGNATURE-----

Merge tag '0.18.2'

notmuch 0.18.2 release
2014-10-25 18:55:25 +02:00
David Bremner
e842030893 version: bump to 0.18.2
No non-documentation changes
2014-10-25 18:23:06 +02:00
David Bremner
ce44657c9e notmuch 0.18.2~rc1 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJUS2vpAAoJEPIClx2kp54svhoL/1kCYjeONhccqb1cyjCVPsC7
 NBGZ48JZNqmDnxrjjz4PgrA9R7h/4R4ViWboCNGFJEbQaPqh89klLa+XiOpaNoyZ
 Y2oP/GrZNXg2TtThehywwWY2w/Q2+bfpyI8C1RnXDuLzvtS6fTpSfGX9+yr7KfUE
 fT56r2V68HHTaTUSFvywKpnRMNnExoa1HT/0EdDRV3v3LqlqALZwgyJAv7hb7EfX
 0a7Q5JChVhQyq+BRq4tKJA2g/n3s54dy3cIBXmSjo8CvOar+GVgrceZ5i1al7Z7x
 D2BDpMfr2qV4fJYapsH+n3fsUhr0LmG651A5A2GdaGUNhLtP28hGPUZpT+ejzTAW
 GOWdlF+PzDCMhdZzqjYQUqN3ROgQsDUcGrwXv+tVv2AoZepSbxyhIeIzU71dD/vx
 5JEP3EVJMwgWbDHKeOzv1+nwzQpMWk8/vxSA9SPN9MBUMkNjaKyrY1YBrX6xtUn0
 l3iglBOdTcqr0uZSVSTU4sODcKtd/w2TlSOSWWnRNA==
 =KuiR
 -----END PGP SIGNATURE-----

Merge tag '0.18.2_rc1'

notmuch 0.18.2~rc1 release

Conflicts:
	NEWS
	debian/changelog
2014-10-25 11:38:18 +02:00
David Bremner
60bbc06ac0 version: bump to 0.18.2~rc1 2014-10-25 11:03:05 +02:00
Thibaut Horel
e13d557bfd python: Add binding for notmuch_query_add_tag_exclude
Implemented as the method `exclude_tag` of the class `Query`. This method takes
one argument, a string containing the name of the tag to exclude.
2014-09-23 18:23:39 +02:00
David Bremner
f6ce18fae9 python: bump SONAME
This should have happened in commit 6754ad9f9, but oops.

This was not caught by our test suite because it uses an installed
notmuch library of it cannot find the just built one.
2014-09-16 20:50:57 +02:00
Peter Wang
034102303e ruby: handle return status of database close
Throw an exception if notmuch_database_destroy fails.
2014-09-16 20:17:15 +02:00
Peter Wang
d81fc4b42d go: add return status to database close method
Add return status to the Database.Close() method that calls
notmuch_database_destroy.
2014-09-16 20:17:06 +02:00
Peter Wang
ea90d8e043 python: handle return status of database close and destroy
Throw an exception if notmuch_database_close or notmuch_database_destroy
fail.
2014-09-16 20:16:52 +02:00
David Bremner
6ef676aac3 notmuch 0.18.1 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJTqqd6AAoJEPIClx2kp54sQDEL/i9V9jsKyXWSx6wCVxynIzhI
 cI5IO2IqtS5sX/DsU3R581TJNs5zEDv1AVjGtzx0MXD3mP5SY6A04aLkhFH3FZyb
 nAOFWtETQ/ghlULLoWYOz+b63Xj7nleH5ji4QyU28nk0eaXS0wGGJNgotK1Fhvvc
 99vsPo1Ci8OeQeKGjXNE2vDdlefXT5zIYde+QP5ofIdyzOVZMCK1KTb5QBGwQGQ0
 i8DaMyCRQvzXU4WHC/XHJZhcZ62CvrDWfG3wnxREmz5q9G98p86A29MRJkHZdQOv
 3aFguu/zGDSxi/6Y+e8sJb5f4yQBqyX5v83kkkRju3OUSTPLgzHfb+KLuVNhA3/m
 2U/vWdHpUMGgPLBcEd4s4AbjgeVMEY6DGKZ0bexZ68nq0QrxTVCDYtpipPF8ECk2
 zM4rDBqAfTMnXLptzzGwFPtk1G70vRml8uqaHp6YSnltQj1hiGo7U/4RGo6gpL2I
 EKfgOtuO+e8mRFhc+TAN6MNbAI+cCSkZ31e3kWbAog==
 =6Kk+
 -----END PGP SIGNATURE-----

Merge tag '0.18.1'

notmuch 0.18.1 release
2014-06-25 08:01:17 -03:00
David Bremner
4276eba3ca version: bump to 0.18.1
Also add precis of NEWS to debian changelog
2014-06-25 07:30:10 -03:00
David Bremner
fea7a41181 notmuch 0.18.1~rc0 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJTp3iwAAoJEPIClx2kp54sbR8MAIXabp2QmfGVaQ5dOvSv7peD
 2GDUpx4+LFEybPL5tJJIc/WQ8Y8AqCytb3UY6wBdrq0j5AhhdVXxc7DPINuG523W
 6PNW3Hd9U1Ot2wiDNvebUjsRnEUYo0vagBptwRizhizQ4SONjYXEP9F9p51XyiTY
 33+TN9AlAcOngfoNhNAHTKWa7lGxIo8EZOqwoivk63xgv/MSD2RZT3kEaiK6HcBU
 GXRK4Lh0rWlbSZfAA30UwBXUHqVc8TjRcqecqAeV68tUlckuOdlfImTAtnGeRNbJ
 U7nfh7UtOyFswK8/L/uwXtLPTjXQhIpUhIuAR6Kvs9nEKhkEFBxUkJi41NA4yhlN
 eqhLMJ+BSZWpbOsTCaW5ZYHO36u1N6vD7A2Eqz839zRaSrOmcnQD974qpdZ67lDN
 A2qORV6WfmZhROvy75h+l8Da2IJmOMU0rzggszM3KQD9Ry8LrwBMktt1dHl5njvQ
 xqqRrHFNjUziqqR4RISjJ0LduTrIKty2Gw+yjgLvlA==
 =EJdx
 -----END PGP SIGNATURE-----

Merge tag '0.18.1_rc0'

notmuch 0.18.1~rc0 release
2014-06-22 22:25:10 -03:00
David Bremner
294f956d86 version: bump to 0.18.1~rc0
Also bump the python bindings version, the NEWS version and the Debian
version.

Since the changelog is (slightly dubiously) metadata, we have to
change it to upload a release candidate.
2014-06-22 21:30:35 -03:00
David Bremner
94064a6ba2 Merge branch 'release'
A point release is slowly being built on branch release. Merge those
changes into master.
2014-05-28 09:50:32 -03:00
Amadeusz Żołnowski
175144f6ad Unset html_static_path in Python bindings docs
html_static_path is a kind of source directory and it was set to
destination directory (../html) which caused infinite recursion with
Sphinx 1.2 and above.
2014-05-28 09:46:02 -03:00
Wael M. Nasreddine
0629afeb26 ruby: Add wrapper for notmuch_query_count_threads 2014-05-18 06:39:58 +09:00
David Bremner
b661b87801 version: bump to 0.18
debian changelog to be done seperately.
2014-05-06 16:24:17 +09:00
David Bremner
1f2bb88e92 version: bump for 0.18~rc1
Doing all of the needed version bumps in one commit, and do a
complete, if minimal debian changelog entry
2014-05-04 07:34:00 +09:00
David Bremner
d879c47ff1 python: bump version 2014-04-22 09:40:28 +09:00
Gaute Hope
5569344a7e ruby bindings message: docstring typo 2014-02-21 21:13:03 -04:00
David Bremner
ceef57b3d9 version: bump to 0.17 2013-12-30 20:34:23 -04:00
David Bremner
05b534209d version: bump to 0.17~rc4
Unfortunately release-checks.sh will whine a bit because it has not
caught up with the renaming of the version macros.
2013-12-28 18:40:05 -04:00
David Bremner
bb390f89a1 version: bump version
Roll (one last?) release candidate because of Austin's
LIBNOTMUCH_VERSION changes.

Atomically bump the manually (NEWS, debian/changelog) and
automatically (everywhere else) updated places version is mentioned.
2013-12-07 17:07:15 +08:00
David Bremner
6c9cd7d20c version: bump to 0.17~rc2 2013-11-28 21:00:52 -04:00
David Bremner
bd0c56b2bd version: bump to 0.17~rc1
Various other files are synched using "make update-versions".  NEWS
has to be hand edited.
2013-11-23 20:29:46 -04:00
David Bremner
80b25792b2 version: set new version and release date
These are manually set in version and NEWS, and propagate to the other files via
"make update-versions"
2013-07-28 11:28:03 -03:00
Tomi Ollila
acb079e357 Python bindings: CDLL("libnotmuch.3.dylib") on Darwin
Use os.uname() to check for 'Darwin' and load "libnotmuch.3.dylib"
instead of "libnotmuch.so.3" if that is the case.
2013-07-09 08:38:42 +02:00
David Bremner
5306b2b1e5 bindings/go: Start a .gitignore for go bindings.
In particular ignore downloaded source from github.com
2013-06-03 08:07:22 -03:00
David Bremner
9a1ab6c487 bindings/python: ignore build subdirectory.
Update .gitignore to make git status less noisy
2013-06-03 08:00:29 -03:00
Felipe Contreras
8c3d19313e ruby: use in-tree notmuch library
Currently it simply finds any library available, and if notmuch is
installed in the system, it would give priority to that library.

Let's implement our own helper functions to link directly to the local
library, and give priority to the local header file.

Also, add an option to properly check if there are missing symbols.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-05-23 08:15:20 -03:00
Felipe Contreras
ed9ef5dc5a ruby: fix missing symbol UINT2FIX()
It has never existed in Ruby (maybe JRuby). Fortunately the symbols are
loaded lazily, so nobody would notice unless they try
'query::count_messages'.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2013-05-23 08:03:58 -03:00
Austin Clements
45b9b55863 python: Add bindings for notmuch_thread_get_messages 2013-05-05 13:56:39 -03:00
Justus Winter
44fe1f2c16 go: use a different goconfig package
The notmuch-addrlookup utility uses a third party library to read the
notmuch configuration file. The previously used implementation at
"github.com/kless/goconfig" vanished, so this patch switches to the
implementation at "github.com/msbranco/goconfig". As the
implementations differ at the API level, the code is updated
accordingly.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2013-05-03 21:21:01 -03:00
David Bremner
16aa65ba25 Merge branch 'release'
add in NEWS from 0.15.2

Conflicts:
	NEWS
2013-02-18 20:33:48 -04:00
Austin Clements
c4f96d0931 ruby: Add bindings for notmuch_thread_get_messages 2013-02-18 20:23:40 -04:00
David Bremner
bcccc2e1fe bump versions to 0.15.2 2013-02-17 11:39:46 -04:00
David Bremner
7264732a79 Merge branch 'release'
Conflicts:
	NEWS

Inserted news from 0.15.1
2013-01-24 22:29:09 -04:00
David Bremner
d273ed6cf1 version: bump to 0.15.1
A simple bugfix release, no user visible changes
2013-01-24 07:11:27 -04:00
Justus Winter
c8cb2beda7 python: fix the creation of notmuch databases
Remove the superfluous mode argument given to notmuch_database_create
fixing the creation of notmuch databases using python code.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2013-01-23 18:12:04 +01:00
David Bremner
df9f50185c version: update to 0.15
Bump the version in-place in NEWS.
2013-01-18 21:27:57 -04:00
David Bremner
81866a82ad version: set version to 0.15~rc1
This is in some sense a rollback, but it makes all the automation
happier if the Debian and upstream versions match.
2013-01-16 23:23:00 -04:00
David Bremner
37be45767f version: bump to 0.15
"Atomically" update the python bindings and man page versions.
2013-01-07 21:38:20 -04:00
Justus Winter
db64b67bf8 python: remove now unused import of module sys
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-12-21 14:23:54 +01:00
Justus Winter
0687e2ae23 python: remove functions that have been marked as deprecated in 0.14
Removes Message.{format,print}_messages.

This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch. The code has been marked as deprecated
in 0.14 and is now removed.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-12-21 10:56:06 +01:00
Justus Winter
8728340644 python: remove Database.db_p
The function has been marked as deprecated in 0.14 and is now removed.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-12-21 10:56:06 +01:00
David Bremner
6442a47361 version: propagate version changes
These are the result of running "make update-versions"
2012-08-21 10:43:49 +02:00
Tomi Ollila
d796dad4ed ruby: extern linkage portability improvement
Some C compilers are stricter when it comes to (tentative) definition
of a variable -- in those compilers introducing variable without 'extern'
keyword always allocates new 'storage' to the variable and linking all
these modules fails due to duplicate symbols.

This is reimplementation of Charlie Allom's patch:
id:"1336481467-66356-1-git-send-email-charlie@mediasp.com",
written originally by Ali Polatel. This version has
more accurate commit message.
2012-06-29 22:24:17 -03:00
David Bremner
5973881b77 notmuch 0.13.2 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iJwEAAECAAYFAk/LdWUACgkQTiiN/0Um85mL8AP/UosXwRabmZT8WjsJ/tPT0N2s
 zIBguJM7jNwnODZ1kFuS5AjxslbsA3SVubWI1rB5CZwINoF0+f+zc1pHHjAjy61R
 XAbSIQsI+2XvnfvDFnLYzyZb6xUX/Q1vczoJ4o2ngLMW5+kkERWYN+T6Ee291c/D
 MTPvV4fuHxvnFAX+Oig=
 =DiJS
 -----END PGP SIGNATURE-----

Merge tag '0.13.2'

notmuch 0.13.2 release
2012-06-03 11:38:08 -03:00
David Bremner
9d5f73db7a version: update to 0.13.2 2012-06-02 18:10:55 -03:00
David Bremner
d99f15d7ee Merge branch 'release' 2012-05-29 09:07:31 -03:00
Felipe Contreras
5946aba519 Revert "ruby: Add workarounds to use in-tree build not the installed one"
This reverts commit 82b73ffd73.

Only leave the copyright changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
(cherry picked from commit 35cb1c95cc)
2012-05-28 10:21:37 -03:00
David Bremner
df96c93239 version: bump to 0.13.1 2012-05-25 21:17:54 -03:00
Felipe Contreras
35cb1c95cc Revert "ruby: Add workarounds to use in-tree build not the installed one"
This reverts commit 82b73ffd73.

Only leave the copyright changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2012-05-25 15:11:31 +02:00
David Bremner
6d44c5af65 Merge branch 'release'
merge 0.13.1 bugfix patches back to master, fixes for emacs reply and
spurious directory document creation.
2012-05-23 22:48:16 -03:00
Austin Clements
54508eb78d python: Remove find_message_by_filename workaround
Now that notmuch_database_find_message_by_filename works on read-only
databases, remove the workaround that disabled it on read-write
databases.

This also adds a regression test for find_message_by_filename.
2012-05-23 22:32:02 -03:00
Austin Clements
f1f1e39639 python: Update Database.get_directory documentation
notmuch_database_get_directory no longer returns an error for
read-only databases, so remove ReadOnlyDatabaseError from the list of
get_directory exceptions.
2012-05-23 22:31:36 -03:00
Justus Winter
8c123d0da6 python: deprecate Messages.{format,print}_messages
This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch, so this code will be removed in
notmuch 0.15.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 19:10:28 +02:00
Justus Winter
892bb1ee6d python: deprecate Database.db_p
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 19:09:25 +02:00
Justus Winter
8f667be2ac python: fix Message.get_header
8dc8495010 introduced a bug, if the
requested header is not set the underlying notmuch function returns an
empty string that also made the expression true resulting in an
exception being raised. Partly revert the commit to fix this
issue. Testing for equality with None is correct in this case since
the restype of the function Message._get_header is c_char_p so NULL
pointers are in fact converted to None in this case.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 18:23:11 +02:00
Justus Winter
8e3faa7f18 python: add a file abstracting away differences between python 2 and 3
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 18:23:11 +02:00
Justus Winter
643719dfce python: remove the "notmuch binary" section from the docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 17:47:49 +02:00
Justus Winter
8dc8495010 python: Fix the remaining broken NULL pointer tests
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 17:15:49 +02:00
Justus Winter
05c3e83bd2 python: use relative imports
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 16:58:53 +02:00
Justus Winter
5bc5471c54 python: remove unused import of the json module
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 16:55:29 +02:00
Justus Winter
b9d1045474 python: remove format_message_as_{json,text} from the sphinx docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:57:45 +02:00
Justus Winter
cd8fe01013 python: remove functions that have been marked as deprecated in 0.13
Removes Message.format_message_{internal,as_json,as_text}.

This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch. The code has been marked as deprecated
in 0.13 and is now removed.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:55:15 +02:00
Justus Winter
eab15cc707 python: remove notmuch.py
Removes notmuch.py. If someone wants to step up and work on this it
can always be restored using the version control system.

notmuch.py was meant to be a python implementation of the notmuch
utility. It was never finished and hasn't been updated to changes in
the API and bindings and its features and interface haven't been kept
in sync with the notmuch utility.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:55:15 +02:00
David Bremner
3fb08bc125 version: bump to 0.13 2012-05-15 18:18:45 -03:00
Austin Clements
bc4000a952 ruby: Update for changes to notmuch_database_get_directory 2012-05-15 08:59:05 -03:00
Austin Clements
ed4f73a080 python: Update for changes to notmuch_database_get_directory
notmuch_database_get_directory now returns
NOTMUCH_STATUS_READ_ONLY_DATABASE on its own (rather than crashing) so
the workaround in Database.get_directory is no longer necessary.
2012-05-15 08:58:47 -03:00
Austin Clements
cdaf253c99 go: Update for changes to notmuch_database_get_directory 2012-05-15 08:58:36 -03:00
Justus Winter
1952889353 go: format the souce code using gofmt
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:36:43 -03:00
Justus Winter
3113731713 go: update the build system
The new "go" utility does not require any Makefiles to compile go
packages and programs. Remove the old Makefiles and replace the top
level Makefile with one defining some convenience targets for
compiling the notmuch bindings and the notmuch-addrlookup utility.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:36:30 -03:00
Justus Winter
9bf6eec1a5 go: update the addrlookup utility to go 1
Use the new built in error type that replaces os.Error, adapt the code
to the fact that strings.Split has just two arguments now.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:35:50 -03:00
Justus Winter
3760a79b3f go: set LDFLAGS to -lnotmuch in the packages source file
Set the LDFLAGS to -lnotmuch so the resulting go package will be
linked with libnotmuch.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:35:38 -03:00
Justus Winter
97565b77cd go: reorganize the go bindings
go 1 introduced the "go" program that simplifies building of libraries
and programs. This patch reorganizes the go code so it can be compiled
using the new utility, it does not change any files.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:32:44 -03:00
Justus Winter
f83a5c6241 go: define the constant STATUS_UNBALANCED_ATOMIC
Add the constant STATUS_UNBALANCED_ATOMIC to the list of notmuch
status codes.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:28:33 -03:00
Justus Winter
0af7295faf go: fix the notmuch status constants
Formerly all the constants were set to zero since in golang constants
are set to the previous value if no new value is specified. Use the
iota operator that is incremented after each use to fix this issue.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:28:21 -03:00
Justus Winter
9f5478637c go: update notmuch-addrlookup to the new API
notmuch.OpenDatabase now returns a status indicating success or
failure. Use this information to inform the user of any failures.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-11 08:28:06 -03:00
David Bremner
a4b10675bf bump version to 0.13~rc1 2012-05-08 14:49:08 -03:00
Ali Polatel
a8e010962f ruby: Add wrapper for notmuch_query_set_omit_excluded() 2012-05-08 10:34:50 -03:00
Ali Polatel
82b73ffd73 ruby: Add workarounds to use in-tree build not the installed one
- Make mkmf use the notmuch.h under ../../lib
- Use libnotmuch.a instead of linking to the installed libnotmuch.so
2012-05-08 10:34:33 -03:00
Ali Polatel
92680f12eb ruby: Add wrapper for notmuch_query_add_tag_exclude 2012-05-08 10:32:56 -03:00
Ali Polatel
d0000daab3 ruby: Add wrapper for notmuch_query_count_messages 2012-05-08 10:32:45 -03:00
Austin Clements
7bf5be75ae lib: Bump SO version from 2.0.0 to 3.0.0
We've changed the APIs of notmuch_database_open,
notmuch_database_create, and notmuch_database_close.

Amended by db: also bump string in bindings/python/notmuch/globals.py
2012-05-05 20:06:09 -03:00
Austin Clements
9721343e5b ruby: Update Ruby bindings for new notmuch_database_{open, create} signatures 2012-05-05 10:14:47 -03:00
Austin Clements
0a357fe410 python: Update Python bindings for new notmuch_database_{open, create} signatures 2012-05-05 10:13:57 -03:00
Austin Clements
2e346b9e2a go: Update Go bindings for new notmuch_database_{open, create} signatures
This requires changing the return types of NewDatabase and
OpenDatabase to follow the standard Go convention for returning
errors.
2012-05-05 10:13:17 -03:00
Austin Clements
ce53850290 go: Update to the current notmuch_database_find_message API
The signature of notmuch_database_find_message was changed in 02a30767
to report errors and the Go bindings were never updated.  This brings
the Go bindings in sync with that change and at least makes them
compile with Go r60.3, the last release before Go 1.
2012-05-04 08:49:43 -03:00
Justus Winter
fcfb619b44 python: remove a note stating wrong things about the memory management
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 19:51:16 +02:00
Justus Winter
ca1e232e5f python: document the Database.close function
Put a prominent warning into the docstring of Database.close, make the
function show up in the sphinx doc and refer to the warning in the
paragraph mentioning the context manager protocol.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 19:48:45 +02:00
Justus Winter
e9bcbe7e70 python: deprecate code formatting messages as text and json
This code adds functionality at the python level that is unlikely to
be useful for anyone. Furthermore the python bindings strive to be a
thin wrapper around libnotmuch, so this code will be removed in
notmuch 0.14.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 19:27:36 +02:00
Justus Winter
7f74a400d1 python: cleanup the __nonzero__ implementations
Cleanup the code, reword the docstring and use the same implementation
in the Threads, Tags and Messages classes.

__nonzero__ implements truth value testing. If __nonzero__ is not
implemented, the python runtime would fall back to `len(..) > 0` thus
exhausting the iterator.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 19:25:16 +02:00
Justus Winter
162687a99e python: fix NULL pointer tests
Fix the NULL pointer tests in the destructors of all classes and
Database.create.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 19:24:34 +02:00
Justus Winter
09fdf2b283 python: update the docstrings of Filenames.{__len__,__unicode}
Formerly the documentation was overly verbose. Reword the comment and
use the same for both functions.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 18:43:02 +02:00
Justus Winter
0803603cdd python: update the docstring of class Filenames
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 18:39:06 +02:00
Justus Winter
60e512d84f python: fix the documentation
Remove the reference to Filenames.as_generator in the sphinx
documentation.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 18:32:32 +02:00
Justus Winter
bbc38c5c11 python: fix Message.get_filenames
Do not to use the removed function Filenames.as_iterator.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 18:27:15 +02:00
Justus Winter
e74b1f807b python: remove the deprecated function Filenames.as_generator
Remove the function Filenames.as_generator that has been marked as
deprecated in 0.12.

The class Filenames implements the iterator protocol so you can
directly iterate over such objects instead.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 18:13:31 +02:00
Justus Winter
1f08664a6b python: strip superfluous single quote from copyright notices
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:33:06 +02:00
Justus Winter
43ee25f7a9 python: add copyright and licensing information to setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:30:38 +02:00
Justus Winter
51e8e68649 python: stylistic and pep8 fixes in setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:28:50 +02:00
Justus Winter
3ff39766d4 python: update the long description in setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:26:36 +02:00
Justus Winter
99b4ae1a88 python: fix the test asserting that reading the version succeeded
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:21:32 +02:00
Justus Winter
61cf962df8 python: simplify a path expression in setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:18:52 +02:00
Justus Winter
7190b0dbc2 python: Remove unused import from setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:15:41 +02:00
Justus Winter
7bfc4bf501 python: wrap and use notmuch_database_destroy as destructor
Adapt the python bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-28 09:31:12 -03:00
Justus Winter
288feb7cdf ruby: Use notmuch_database_destroy instead of notmuch_database_close
Adapt the ruby bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-28 09:30:02 -03:00
Justus Winter
22f73735c5 go: Use notmuch_database_destroy instead of notmuch_database_close
Adapt the go bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-28 09:29:38 -03:00
David Bremner
c302bfa2f6 update version to 0.12
There may be a few NEWS changes after this, but no code (hopefully).
2012-03-19 22:28:17 -03:00
David Bremner
d71cb5e45b bump version to 0.12~rc2 2012-03-18 08:07:00 -03:00
Justus Winter
3a95f3fbc1 python: fix signature of two wrapped libnotmuch functions
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-03-18 07:59:36 -03:00
David Bremner
916aefc2de bump version to 0.12~rc1
As usual, only `version' is edited by hand. The rest of the changes I
blame on the machine.
2012-03-01 07:47:21 -04:00
Justus Winter
d50171d1cc python: split the documentation
Move each classes documentation into its own file and thus into its
own page in the generated documentation.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-24 01:55:33 +01:00
Justus Winter
594dbb6243 python: move the notmuch module section to notes.rst
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-24 01:30:04 +01:00
Justus Winter
8dfbba05fa python: move the usage example to quickstart.rst
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-24 01:18:54 +01:00
Justus Winter
fb52083bf7 python: strip module prefix in the sphinx documentation
Remove the notmuch prefix from classes in the documentation. This
change makes the table of contents look much nicer.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-24 00:38:47 +01:00
Justus Winter
90fb4e8334 python: mention the exception class refactoring in the docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-23 00:14:59 +01:00
Justus Winter
a7561cc20b python: move the exception classes into error.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-23 00:11:22 +01:00
Justus Winter
df0e1cf788 python: rename filename.py into filenames.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 22:44:35 +01:00
Justus Winter
76a2db3d7b python: move Threads class into its own file
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 22:39:52 +01:00
Justus Winter
69f077898a python: move Messages class into its own file
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 22:34:40 +01:00
Justus Winter
ba95980cf1 python: refactor the python bindings
Move the Directory class into its own file, merge the two Filenames
classes into one, deprecate Filenames.as_iterator, update the
documentation accordingly.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 22:06:45 +01:00
Justus Winter
1736488ecf python: work around libnotmuch calling exit(3) in Database.find_message_by_filename
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
05cdb3d7b7 python: improve the docstring of Database.find_message_by_filename
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
fcf19ad029 python: work around libnotmuch calling exit(3) in Database.get_directory
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
35ceaf496f python: Improve the docstring of Database.get_directory
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
92983dd14e python: avoid using a magic value for database mode in Database.__init__
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
0b2ff308ec python: fix the type nonsense of the first parameter of class Directory
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 01:06:15 +01:00
Justus Winter
c1094bc2d7 python: allow an empty path as parameter to Database.get_directory
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 00:56:07 +01:00
Justus Winter
786f9882e8 python: remove :returns: keywords from functions returning nothing
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 00:15:59 +01:00
Justus Winter
1737ff5290 python: rework Directory.set_mtime
Fix the indentation within the docstring, remove useless remarks, do
some trivial refactoring.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 00:13:20 +01:00
Justus Winter
798b74e859 python: harmonize the sphinx keyword for exceptions
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 00:01:23 +01:00
Justus Winter
a1442952d4 python: refactor the error handling machinery
Raise specific error classes instead of a generic NotmuchError with an
magic status value (e.g. NotmuchError(STATUS.NULL_POINTER) ->
NullPointerError()), update the documentation accordingly.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-20 23:49:07 +01:00
Justus Winter
4bb9f59ff6 python: fix the projects name and update years of the copyright notice in the sphinx docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-20 21:48:35 +01:00
Justus Winter
be851ad39d python: more error handling fixes
This is a follow up commit to 221c7e0b38
fixing more NULL pointer checks.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-19 00:36:15 +01:00
Justus Winter
ab2f9fd828 python: remove trailing whitespace within the documentation source files
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:41:23 +01:00
Justus Winter
bf6039e34e python: improve Query.count_messages docstring
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:39:39 +01:00
Justus Winter
ff8f864245 python: wrap notmuch_query_count_threads as Query.count_threads
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:39:39 +01:00
Justus Winter
4315ac015a python: refactor Query class
Put each libnotmuch function reference right in front of the
corresponding python wrapper.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:13:06 +01:00
Justus Winter
5d69d272c3 python: move Query class to its own file
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:10:45 +01:00
Justus Winter
ff287531ca python: remove unused but imported symbol
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:01:33 +01:00
Justus Winter
c471d44837 python: remove unused but imported symbol
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 00:57:59 +01:00
Justus Winter
36ce7e3c98 python: implement the context manager protocol for database objects
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-15 22:41:16 +01:00
Justus Winter
b2734519db python: provide a Database.close function
Rename Database.__del__ to Database.close, move it just below the open
function and call close() in a newly created destructor just below the
constructor.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-15 22:25:13 +01:00
Justus Winter
bb514d7862 py3k: Fix decoding of default database name in Database._get_user_default_db
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-10 22:34:47 +01:00
Justus Winter
ae376c774e python: mock out the ctypes library
This allows rtfd.org to build the documentation without libnotmuch.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-10 18:55:33 +01:00
Justus Winter
8c5be7d12d python: Add a Mock class to the sphinx config that can be used to mock modules
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-10 18:54:49 +01:00
David Bremner
d43f6c00b3 Merge commit '0.11.1'
Conflicts:
	NEWS
	bindings/python/notmuch/database.py
	bindings/python/notmuch/message.py
	notmuch.1

NEWS merged by hand, others taken from master.
2012-02-04 12:01:46 -05:00
David Bremner
c10b780b44 version: bump to 0.11.1
also semi-automatically update man page and python bindings versions.
2012-02-03 08:32:49 -04:00
Justus Winter
221c7e0b38 python: fix error handling
Before 3434d1940 the return values of libnotmuch functions were
declared as c_void_p and the code checking for errors compared the
returned value to None, which is the ctypes equivalent of a NULL
pointer.

But said commit wrapped all the data types in python classes and the
semantic changed in a subtle way. If a function returns NULL, the
wrapped python value is falsish, but no longer equal to None.

Backported from master to 0.11.
2012-01-23 07:44:08 -04:00
Justus Winter
8015cbff26 python: fix error handling
Before 3434d1940 the return values of libnotmuch functions were
declared as c_void_p and the code checking for errors compared the
returned value to None, which is the ctypes equivalent of a NULL
pointer.

But said commit wrapped all the data types in python classes and the
semantic changed in a subtle way. If a function returns NULL, the
wrapped python value is falsish, but no longer equal to None.
2012-01-22 06:14:57 +01:00
Justus Winter
7ddd849015 py3k: add a specialized version of _str for python3
All strings are unicode strings in python 3 and the basestring and
unicode types are removed hence the need for a specialized version.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-01-16 13:43:11 +01:00
David Bremner
0bbfc5ce8b Merge branch 'release'
Conflicts:
	notmuch-reply.c
	notmuch.1
2012-01-13 20:52:01 -04:00
David Bremner
9ada8335c6 Update version to 0.11 2012-01-13 19:58:36 -04:00
David Bremner
310608f279 version: update to 0.11~rc3
We found another serious-ish bug during freeze.
2012-01-09 07:05:40 -04:00
Sebastian Spaeth
228d8c0528 python: str.decode() doesn't like kwargs in python 2.5
Recent changes introduced lots of unicodification of strings, mostly in
the form of .decode('utf-8', errors='ignore'). However, python 2.5 does
not like the errors keyword argument and complains. It does work when
used as a simple arg though, so that's what this patch does.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2012-01-02 17:07:53 +01:00
Justus Winter
ada246aa20 python: make the result of Message.get_replies() more pythonic
Formerly Message.get_replies() returned an iterator or None forcing
users to check the result before iterating over it leading to strange
looking code at the call site.

Fix this flaw by adding an EmptyMessagesResult class that behaves like
the Messages class but immediatly raises StopIteration if used as an
iterator and returning objects of this type from Message.get_replies()
to indicate that there are no replies.
2012-01-02 17:01:40 +01:00
Justus Winter
e32c8a5e6b python: refactor print_messages into format_messages and print_messages 2012-01-02 16:55:53 +01:00
Justus Winter
83b256b12b python: add missing conversions from and to utf-8 2012-01-02 16:34:56 +01:00
Justus Winter
4a6642a2a1 py3k: Add and use a mixin class that implements __str__
Amended by Sebastian Spaeth <Sebastian@SSpaeth.de> to include the
required sys import in globals.py.
2012-01-02 16:33:29 +01:00
Justus Winter
26d52cf6cf py3k: Rename .next() to __next__(), add python2.x compatibility alias 2012-01-02 16:12:28 +01:00
Justus Winter
9c32ee5372 py3k: All strings are unicode strings in py3k 2012-01-02 16:11:52 +01:00
Justus Winter
4ed0362d41 py3k: The ConfigParser module has been renamed to configparser 2012-01-02 16:08:32 +01:00
Justus Winter
676ce952d3 py3k: The execfile built-in has been removed in python 3 2012-01-02 16:06:59 +01:00
David Bremner
ff58a06e83 version: bump to 0.11~rc2
This to "celebrate" pushing a bugfix in at the last minute.
2012-01-02 06:50:07 -04:00
David Bremner
c616ada489 version: update version to 0.11~rc1
and keep python, man page, and debian package in sync.
2011-12-25 23:09:17 -04:00
David Bremner
f0e0053149 Merge branch 'release'
Conflicts:
	NEWS

Conflicts resolved by inserting the 0.10.2 stanza before 0.11
2011-12-06 19:39:33 -04:00
Patrick Totzke
c4d824bc1e fix format string in Message.__unicode__
Since 2b01161191, Message.__str__ doesn't
construct a hash containing the thread data before
constructing the formatstring. This changes the formatstring
to accept positional parameters instead of a hash.
2011-12-06 21:56:40 +01:00
Sebastian Spaeth
50b0d0b8ad python: Remove stray debug comment
This slipped in wrongly in commit 71e0082eff (due to my fault).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-12-06 13:36:48 +01:00
Thomas Jost
71e0082eff python: use wrapped notmuch_*_t types instead of raw pointers
Now that types are checked correctly, we also need to make sure that all the
arguments actually are instances of these types. Otherwise the function calls
will fail and raise an exception similar to this one:
   ctypes.ArgumentError: argument 3: <type 'exceptions.TypeError'>: expected
   LP_LP_NotmuchMessageS instance instead of pointer to c_void_p
2011-12-06 13:34:30 +01:00
Patrick Totzke
672b6337b4 errors='ignore' when decode to unicode 2011-12-06 13:28:39 +01:00
Patrick Totzke
ffe3097e58 use __unicode__ for string representation 2011-12-06 13:27:08 +01:00
Patrick Totzke
2b01161191 clean up Thread.__str__ 2011-12-06 13:21:42 +01:00
Sebastian Spaeth
ecf8da35e2 python: Return a STATUS value in tags_to_flags and flags_to_tags
We were not returning anything at all, which does not match the API
documentation. Fixed. Thanks to Patrick Totzke for the heads up.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-12-06 12:38:52 +01:00
Patrick Totzke
86b0aeb1ca remove unused imports 2011-12-06 12:28:35 +01:00
Patrick Totzke
12ebf87947 fix sphinx compile-time warnings
no changes to the code, only makes compiling the docs smoother
as some rsT syntax errors were fixed
2011-12-06 12:23:50 +01:00
Patrick Totzke
4292b1197d pep8 fixes
no changes to the code, only fixed stuff denounced by `pep8 *py`
2011-12-06 12:20:45 +01:00
David Bremner
d7276c6241 version: bump for bugfix release 0.10.2 2011-12-05 18:07:00 -04:00
Justus Winter
3434d19402 python: annotate all calls into libnotmuch with types
Add type information to the ctypes._FuncPtr wrappers and
use the wrapper classes instead of c_void_p for pointers
to notmuch_*_t.

This enables the ctypes library to type check parameters
being handed to functions from the notmuch library.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-12-01 22:24:19 +01:00
Justus Winter
e92b438f46 python: add classes to wrap all notmuch_*_t types
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-12-01 22:24:12 +01:00
David Bremner
f3ad20b20a version: update to 0.10.1 2011-11-25 12:11:04 -05:00
David Bremner
1915c14a3a version: update to 0.10 2011-11-23 07:37:02 -04:00
David Bremner
eb88cd977b version: update version info for 0.10~rc2
Arguably editing debian/changelog violates the "do one thing at a
time" rule, but all of these versions need to be kept in sync.
2011-11-19 08:24:30 -04:00
David Bremner
6b8fd9dd41 version: update to 0.10~rc1
and the usual dance with the python bindings version.
2011-11-15 19:46:08 -04:00
David Bremner
8603396861 version: bump to 0.9
also bump python bindings version.
2011-10-11 21:50:56 -03:00
David Bremner
af1dc7ef48 version: bump to 0.9~rc2
We continue to keep the python bindings version in sync manually
2011-10-07 22:42:18 -03:00
Sebastian Spaeth
dba9c31335 python: Set status in the class definitions
Technically, this is a superfluous change, as the self.status variable
currently gets set in NotmuchErrors's __new__ function. However, in the
long run I would like to get rid of the weird __new__ implementation which
might be somewhat confusing for users (NotmuchError(status) returns a
different class, e.g. OutOfMemoryError)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 17:57:46 +02:00
Sebastian Spaeth
5e75398c80 python: help function Query._assert_query_is_initialized
Remove code duplication by using the new helper function. Also raise the
new fine grained exceptions in many cases, rather than the more generic
NotmuchErrors.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 17:55:30 +02:00
Sebastian Spaeth
42f184c236 python: clean up docstrings and API documentation
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 17:54:09 +02:00
Sebastian Spaeth
a8db280f58 python: whitespace fixed in docstrings
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 17:05:37 +02:00
Sebastian Spaeth
2b43a65c1c python: Add the new exception types in the API documentation
as they should be documented...

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 16:58:13 +02:00
Sebastian Spaeth
05926adf73 python: Catch up with find_message(by_filename) API changes
message is now an out parameter, and we get an additional status code as
a result. Hurray \o/.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 16:44:35 +02:00
Sebastian Spaeth
70479753a6 python: also use libnotmuch.so.2
Catch up with the major version bump. I wonder if this could somehow be
automatically made the correct version number. Oh well, I hope it
doesn't change too often :-).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 15:46:03 +02:00
Ali Polatel
5c00af46ec ruby: Fix macros, use quoting
Fix Data_Get_Notmuch_* macro definitions broken by prev. commit
Adequate quoting for Data_Get_Notmuch_* macros
Remove duplicated RSTRING_PTR() macros, move it to defs.h
2011-10-04 16:57:33 +03:00
Ali Polatel
c8a88fe95d ruby: Really add wrappers for database_find_message*
Commit 898613116d only added wrapper
functions but did not register them. Register the functions in module's
initialization function.
2011-10-04 16:48:34 +03:00
Ali Polatel
05dddf883d ruby: be consistent with notmuch's coding style
No functional change, just indentation
2011-10-04 16:43:40 +03:00
Ali Polatel
898613116d ruby: Add wrappers for database_find_message*
Two new wrappers:
Notmuch::Database.find_message(id) => Notmuch::Message or nil
Notmuch::Database.find_message_by_filename(path) => Notmuch::Message or nil
2011-10-04 16:06:20 +03:00
Thomas Jost
a859d1c866 python: fix Message.get_filenames()
Previously, the Filenames generator only yielded *one* filename before
returning, making Message.get_filenames() behave as Message.get_filename(). This
commit fixes this incorrect behavior: now the generator yields all the
filenames, as expected.
2011-10-01 00:40:20 +02:00
Sebastian Spaeth
8c51525e82 python: rework creating of Subclasses
Add some smart magic, so that when we invoke a
NotmuchError(STATUSVALUE), a nicely derived subclass is created, e.g. a
OutOfMemoryError. This way users can easily distinguish between error
types, while still catching NotmuchError.

I have tested this, and hope it works for others too.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-30 16:04:42 +02:00
Justus Winter
b6a01735d2 python: provide more exception classes
To make the exception handling more effective in code using the
python bindings it is necessary to differentiate between the
different kind of failures.

Add an exception class for each status code and add a decode
classmethod to the NotmuchError class that acts as a factory.

Import the new classes in __init__.py so they can be easily
imported by anyone.

Patch modifed by Sebastian Spaeth.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-30 13:58:03 +02:00
Justus Winter
a378a91ba2 python: fix docstring of Message.get_header()
Update the docstring from notmuch.h.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-30 11:08:51 +02:00
Sebastian Spaeth
f63d605835 python: Add new functions in API documentation
Add documentation for the three new functions and add in which version
they have been added.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-29 11:00:43 +02:00
Sebastian Spaeth
eb4cd33e6b python: Improve code documentation
1) Fix added .gitignore from commit dc8a1745 to work on the docs folder
2) Improve in-code developer documentation to produce better
   sphinx-generated documentation. No code changes.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-29 10:47:28 +02:00
Justus Winter
19daa117b9 properly raise exceptions in python bindings
There are various locations where exceptions are constructed but
not raised. This patch adds the necessary raise statements.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29 09:48:06 +02:00
Justus Winter
34990908e7 python: raise a more specific error in Messages.print_messages
Raising Exception is considered bad since the only way to catch
it is to do 'except Exception'. Raising a TypeError is more
appropriate.

Since the format parameter has already been validated, checking
it again is not necessary. Simplify this conditional.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29 09:39:45 +02:00
Justus Winter
f88d985e50 python: rename _verify_dir_initialized to _assert_dir_is_initialized
Rename the function to clarify its effect and remove all the comments
accompanying each call to the function.

Modified by Sebastian Spaeth to apply cleanly again and remove some
blank lines.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-29 09:29:17 +02:00
Justus Winter
94a1bb88aa python: rename _verify_initialized_db to _assert_db_is_initialized
Rename the function to clarify its effect and remove all the comments
accompanying each call to the function.

Modified slightly by Sebastian Spaeth to catch all new instances and
remove some blank lines too.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29 09:23:13 +02:00
Justus Winter
c16e47fe23 python: fix NotmuchError.__str__ if status == None
Passing None to STATUS.status2str raises an ArgumentError. Add a
check for this case and provide a generic message.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29 09:16:34 +02:00