aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/python/notmuch/thread.py
Commit message (Collapse)AuthorAge
* python: Add bindings for notmuch_thread_get_messagesGravatar Austin Clements2013-05-05
|
* python: Fix the remaining broken NULL pointer testsGravatar Justus Winter2012-05-17
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: use relative importsGravatar Justus Winter2012-05-17
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: fix NULL pointer testsGravatar Justus Winter2012-04-30
| | | | | | | Fix the NULL pointer tests in the destructors of all classes and Database.create. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* 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>
* python: move Threads class into its own fileGravatar Justus Winter2012-02-22
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: move Messages class into its own fileGravatar Justus Winter2012-02-22
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: harmonize the sphinx keyword for exceptionsGravatar Justus Winter2012-02-21
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: refactor the error handling machineryGravatar Justus Winter2012-02-20
| | | | | | | | 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>
* python: more error handling fixesGravatar Justus Winter2012-02-19
| | | | | | | This is a follow up commit to 221c7e0b38177f5f1dbf0561580c15e8aaa49004 fixing more NULL pointer checks. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: fix error handlingGravatar Justus Winter2012-01-22
| | | | | | | | | | | 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.
* python: str.decode() doesn't like kwargs in python 2.5Gravatar Sebastian Spaeth2012-01-02
| | | | | | | | | 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>
* python: add missing conversions from and to utf-8Gravatar Justus Winter2012-01-02
|
* 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
|
* errors='ignore' when decode to unicodeGravatar Patrick Totzke2011-12-06
|
* clean up Thread.__str__Gravatar 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: 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>
* 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: Fix unsafe utf-8 decodingsGravatar pazz2011-08-17
| | | | | | | | This prevents unsafe calls to decode for return value None in get_authors/get_subject which would current throw an Exception. Original patch modified by Sebastian Spaeth. Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
* decode headers from utf-8 to unicodeGravatar patrick2011-08-15
| | | | | as mail headers are stored as utf-8 in the index, it is safe to return them as unicode strings directly
* python: pep8 compliance for thread.pyGravatar pazz2011-08-09
|
* bindings/python: implement Threads().__nonzero__Gravatar Sebastian Spaeth2011-06-02
| | | | | | | | | | | | | __nonzero__ checks if Threads() contains at least one more valid thread The existence of this function makes 'if Threads(): foo' work, as that previously implicitely called len() exhausting the iterator. This function makes `bool(Threads())` work repeatedly. For further info, see http://docs.python.org/reference/datamodel.html. Credits for the hint go to Brian May. 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.