aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings
Commit message (Collapse)AuthorAge
...
* | py3k: Add and use a mixin class that implements __str__Gravatar Justus Winter2012-01-02
| | | | | | | | | | Amended by Sebastian Spaeth <Sebastian@SSpaeth.de> to include the required sys import in globals.py.
* | py3k: Rename .next() to __next__(), add python2.x compatibility aliasGravatar Justus Winter2012-01-02
| |
* | py3k: All strings are unicode strings in py3kGravatar Justus Winter2012-01-02
| |
* | py3k: The ConfigParser module has been renamed to configparserGravatar Justus Winter2012-01-02
| |
* | py3k: The execfile built-in has been removed in python 3Gravatar Justus Winter2012-01-02
| |
| * version: bump to 0.11~rc2Gravatar David Bremner2012-01-02
| | | | | | | | This to "celebrate" pushing a bugfix in at the last minute.
| * version: update version to 0.11~rc1Gravatar David Bremner2011-12-25
|/ | | | and keep python, man page, and debian package in sync.
* Merge branch 'release'Gravatar David Bremner2011-12-06
|\ | | | | | | | | | | | | Conflicts: NEWS Conflicts resolved by inserting the 0.10.2 stanza before 0.11
* | fix format string in Message.__unicode__Gravatar Patrick Totzke2011-12-06
| | | | | | | | | | | | | | 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.
* | python: Remove stray debug commentGravatar Sebastian Spaeth2011-12-06
| | | | | | | | | | | | This slipped in wrongly in commit 71e0082eff (due to my fault). Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* | python: use wrapped notmuch_*_t types instead of raw pointersGravatar Thomas Jost2011-12-06
| | | | | | | | | | | | | | | | 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
* | errors='ignore' when decode to unicodeGravatar Patrick Totzke2011-12-06
| |
* | use __unicode__ for string representationGravatar Patrick Totzke2011-12-06
| |
* | clean up Thread.__str__Gravatar Patrick Totzke2011-12-06
| |
* | python: Return a STATUS value in tags_to_flags and flags_to_tagsGravatar Sebastian Spaeth2011-12-06
| | | | | | | | | | | | | | 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>
* | remove unused importsGravatar Patrick Totzke2011-12-06
| |
* | fix sphinx compile-time warningsGravatar Patrick Totzke2011-12-06
| | | | | | | | | | no changes to the code, only makes compiling the docs smoother as some rsT syntax errors were fixed
* | pep8 fixesGravatar Patrick Totzke2011-12-06
| | | | | | | | no changes to the code, only fixed stuff denounced by `pep8 *py`
| * version: bump for bugfix release 0.10.2Gravatar David Bremner2011-12-05
| |
* | python: annotate all calls into libnotmuch with typesGravatar Justus Winter2011-12-01
| | | | | | | | | | | | | | | | | | | | | | 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>
* | python: add classes to wrap all notmuch_*_t typesGravatar Justus Winter2011-12-01
|/ | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* version: update to 0.10.1Gravatar David Bremner2011-11-25
|
* version: update to 0.10Gravatar David Bremner2011-11-23
|
* version: update version info for 0.10~rc2Gravatar David Bremner2011-11-19
| | | | | Arguably editing debian/changelog violates the "do one thing at a time" rule, but all of these versions need to be kept in sync.
* version: update to 0.10~rc1Gravatar David Bremner2011-11-15
| | | | and the usual dance with the python bindings version.
* version: bump to 0.9Gravatar David Bremner2011-10-11
| | | | also bump python bindings version.
* version: bump to 0.9~rc2Gravatar David Bremner2011-10-07
| | | | We continue to keep the python bindings version in sync manually
* python: Set status in the class definitionsGravatar Sebastian Spaeth2011-10-05
| | | | | | | | | | 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>
* python: help function Query._assert_query_is_initializedGravatar Sebastian Spaeth2011-10-05
| | | | | | | | 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>
* python: clean up docstrings and API documentationGravatar Sebastian Spaeth2011-10-05
| | | | Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: whitespace fixed in docstringsGravatar Sebastian Spaeth2011-10-05
| | | | Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: Add the new exception types in the API documentationGravatar Sebastian Spaeth2011-10-05
| | | | | | as they should be documented... Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: Catch up with find_message(by_filename) API changesGravatar Sebastian Spaeth2011-10-05
| | | | | | | 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>
* python: also use libnotmuch.so.2Gravatar Sebastian Spaeth2011-10-05
| | | | | | | | 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>
* ruby: Fix macros, use quotingGravatar Ali Polatel2011-10-04
| | | | | | 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
* ruby: Really add wrappers for database_find_message*Gravatar Ali Polatel2011-10-04
| | | | | | Commit 898613116db746aa0f915ae43da8aba28545203d only added wrapper functions but did not register them. Register the functions in module's initialization function.
* ruby: be consistent with notmuch's coding styleGravatar Ali Polatel2011-10-04
| | | | No functional change, just indentation
* ruby: Add wrappers for database_find_message*Gravatar Ali Polatel2011-10-04
| | | | | | Two new wrappers: Notmuch::Database.find_message(id) => Notmuch::Message or nil Notmuch::Database.find_message_by_filename(path) => Notmuch::Message or nil
* python: fix Message.get_filenames()Gravatar Thomas Jost2011-10-01
| | | | | | | 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.
* python: rework creating of SubclassesGravatar Sebastian Spaeth2011-09-30
| | | | | | | | | | | 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>
* python: provide more exception classesGravatar Justus Winter2011-09-30
| | | | | | | | | | | | | | | | | 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>
* python: fix docstring of Message.get_header()Gravatar Justus Winter2011-09-30
| | | | | | Update the docstring from notmuch.h. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: Add new functions in API documentationGravatar Sebastian Spaeth2011-09-29
| | | | | | | Add documentation for the three new functions and add in which version they have been added. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* python: Improve code documentationGravatar Sebastian Spaeth2011-09-29
| | | | | | | | 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>
* properly raise exceptions in python bindingsGravatar Justus Winter2011-09-29
| | | | | | | 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>
* python: raise a more specific error in Messages.print_messagesGravatar Justus Winter2011-09-29
| | | | | | | | | | | 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>
* python: rename _verify_dir_initialized to _assert_dir_is_initializedGravatar Justus Winter2011-09-29
| | | | | | | | | | | 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>
* python: rename _verify_initialized_db to _assert_db_is_initializedGravatar Justus Winter2011-09-29
| | | | | | | | | | | 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>
* python: fix NotmuchError.__str__ if status == NoneGravatar Justus Winter2011-09-29
| | | | | | | 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>
* python: add status and message attributes to NotmuchErrorGravatar Justus Winter2011-09-29
| | | | | | | Providing exception objects with meaningful attribute names is much nicer than using e.args[]. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>