Commit graph

302 commits

Author SHA1 Message Date
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