aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/python/notmuch/globals.py
Commit message (Collapse)AuthorAge
* python: bump SONAMEGravatar David Bremner2014-09-16
| | | | | | | 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.
* Python bindings: CDLL("libnotmuch.3.dylib") on DarwinGravatar Tomi Ollila2013-07-09
| | | | | Use os.uname() to check for 'Darwin' and load "libnotmuch.3.dylib" instead of "libnotmuch.so.3" if that is the case.
* python: add a file abstracting away differences between python 2 and 3Gravatar Justus Winter2012-05-17
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* lib: Bump SO version from 2.0.0 to 3.0.0Gravatar Austin Clements2012-05-05
| | | | | | | 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
* python: strip superfluous single quote from copyright noticesGravatar Justus Winter2012-04-29
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: move the exception classes into error.pyGravatar Justus Winter2012-02-23
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* py3k: add a specialized version of _str for python3Gravatar Justus Winter2012-01-16
| | | | | | | 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>
* 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: All strings are unicode strings in py3kGravatar Justus Winter2012-01-02
|
* use __unicode__ for string representationGravatar Patrick Totzke2011-12-06
|
* remove unused importsGravatar Patrick Totzke2011-12-06
|
* pep8 fixesGravatar Patrick Totzke2011-12-06
| | | | no changes to the code, only fixed stuff denounced by `pep8 *py`
* python: add classes to wrap all notmuch_*_t typesGravatar Justus Winter2011-12-01
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* 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: 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>
* 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 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>
* python: add begin|end_atomic bindingsGravatar Sebastian Spaeth2011-09-28
| | | | | | | | | * 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>
* python: Ensure that we pass utf-8 encoded string to libnotmuchGravatar Martin Owens2011-09-16
| | | | | | | | | | | | 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>
* python: pep8 compliance for globals.pyGravatar pazz2011-08-09
|
* python: Improve API documentationGravatar Sebastian Spaeth2011-06-16
| | | | | | Various API doc cleanups and improvements. No code change. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* Move everything down into a bindings/python directory.Gravatar Carl Worth2010-04-21
In preparation for merging the python bindings into the notmuch repository.