summaryrefslogtreecommitdiff
path: root/bindings/python
AgeCommit message (Collapse)Author
2012-01-13Update version to 0.11David Bremner
2012-01-09version: update to 0.11~rc3debian/0.11_rc3-10.11_rc3David Bremner
We found another serious-ish bug during freeze.
2012-01-02version: bump to 0.11~rc2David Bremner
This to "celebrate" pushing a bugfix in at the last minute.
2011-12-25version: update version to 0.11~rc1debian/0.11_rc1-10.11_rc1David Bremner
and keep python, man page, and debian package in sync.
2011-12-06Merge branch 'release'David Bremner
Conflicts: NEWS Conflicts resolved by inserting the 0.10.2 stanza before 0.11
2011-12-06fix format string in Message.__unicode__Patrick Totzke
Since 2b0116119160f2dc83, 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-06python: Remove stray debug commentSebastian Spaeth
This slipped in wrongly in commit 71e0082eff (due to my fault). Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-12-06python: use wrapped notmuch_*_t types instead of raw pointersThomas Jost
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-06errors='ignore' when decode to unicodePatrick Totzke
2011-12-06use __unicode__ for string representationPatrick Totzke
2011-12-06clean up Thread.__str__Patrick Totzke
2011-12-06python: Return a STATUS value in tags_to_flags and flags_to_tagsSebastian Spaeth
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-06remove unused importsPatrick Totzke
2011-12-06fix sphinx compile-time warningsPatrick Totzke
no changes to the code, only makes compiling the docs smoother as some rsT syntax errors were fixed
2011-12-06pep8 fixesPatrick Totzke
no changes to the code, only fixed stuff denounced by `pep8 *py`
2011-12-05version: bump for bugfix release 0.10.2David Bremner
2011-12-01python: annotate all calls into libnotmuch with typesJustus Winter
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-01python: add classes to wrap all notmuch_*_t typesJustus Winter
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-11-25version: update to 0.10.1David Bremner
2011-11-23version: update to 0.10David Bremner
2011-11-19version: update version info for 0.10~rc2debian/0.10_rc2-10.10_rc2David Bremner
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-15version: update to 0.10~rc1David Bremner
and the usual dance with the python bindings version.
2011-10-11version: bump to 0.9David Bremner
also bump python bindings version.
2011-10-07version: bump to 0.9~rc2David Bremner
We continue to keep the python bindings version in sync manually
2011-10-05python: Set status in the class definitionsSebastian Spaeth
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-05python: help function Query._assert_query_is_initializedSebastian Spaeth
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-05python: clean up docstrings and API documentationSebastian Spaeth
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05python: whitespace fixed in docstringsSebastian Spaeth
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05python: Add the new exception types in the API documentationSebastian Spaeth
as they should be documented... Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05python: Catch up with find_message(by_filename) API changesSebastian Spaeth
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-05python: also use libnotmuch.so.2Sebastian Spaeth
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-01python: fix Message.get_filenames()Thomas Jost
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-09-30python: rework creating of SubclassesSebastian Spaeth
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-30python: provide more exception classesJustus Winter
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-30python: fix docstring of Message.get_header()Justus Winter
Update the docstring from notmuch.h. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29python: Add new functions in API documentationSebastian Spaeth
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-29python: Improve code documentationSebastian Spaeth
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-29properly raise exceptions in python bindingsJustus Winter
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-29python: raise a more specific error in Messages.print_messagesJustus Winter
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-29python: rename _verify_dir_initialized to _assert_dir_is_initializedJustus Winter
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-29python: rename _verify_initialized_db to _assert_db_is_initializedJustus Winter
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-29python: fix NotmuchError.__str__ if status == NoneJustus Winter
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-29python: add status and message attributes to NotmuchErrorJustus Winter
Providing exception objects with meaningful attribute names is much nicer than using e.args[]. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29python: add a .gitignore file and refine the toplevel oneJustus Winter
The line 'notmuch' in the toplevel .gitignore file is to broad and matches bindings/python/notmuch making it cumbersome to git-add files within that directory. Refine the toplevel file to only match the generated notmuch executable and add a more specialized .gitignore file to the python directory. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-28python: add begin|end_atomic bindingsSebastian Spaeth
* Add UNBALANCED_ATOMIC status code Catch up with the notmuch status codes, and add the UNBALANCED_ATOMIC one. * Add the begin_atomic and end_atomic calls to libnotmuch Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-28python: Add database_find_message_by_filename bindingsSebastian Spaeth
Add it :-) Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-24version: bump to 0.9~rc1David Bremner
This version number change should not be taken as definitive, rather refer to the signed tag.
2011-09-16python: Ensure that we pass utf-8 encoded string to libnotmuchMartin Owens
If we use unicode objects, libnotmuch would not cope with null bytes in the byte array, so we need to make sure they are nicely formatted as utf-8. Introduce a helper function _str which does this throughout the code. Patch slightly modified by Sebastian Spaeth. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-10update versions for release 0.8David Bremner
See commit 6979b65 for more discussion.
2011-09-06update versions for release candidate0.8_rc1David Bremner
we now have three files to keep in sync. That seems wrong, but I guess we will live with it for now. The main problem is that the python code is distributed separately, so it can't get the version from 'version'. The choice ~rcX is for convenience with debian versioning.