aboutsummaryrefslogtreecommitdiff
path: root/bindings/python
Commit message (Collapse)AuthorAge
...
* python: fix the projects name and update years of the copyright notice in ↵Justus Winter2012-02-20
| | | | | | the sphinx docs Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: more error handling fixesJustus 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: remove trailing whitespace within the documentation source filesJustus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: improve Query.count_messages docstringJustus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: wrap notmuch_query_count_threads as Query.count_threadsJustus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: refactor Query classJustus Winter2012-02-18
| | | | | | | Put each libnotmuch function reference right in front of the corresponding python wrapper. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: move Query class to its own fileJustus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: remove unused but imported symbolJustus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: remove unused but imported symbolJustus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: implement the context manager protocol for database objectsJustus Winter2012-02-15
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: provide a Database.close functionJustus Winter2012-02-15
| | | | | | | | Rename Database.__del__ to Database.close, move it just below the open function and call close() in a newly created destructor just below the constructor. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* py3k: Fix decoding of default database name in Database._get_user_default_dbJustus Winter2012-02-10
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: mock out the ctypes libraryJustus Winter2012-02-10
| | | | | | This allows rtfd.org to build the documentation without libnotmuch. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: Add a Mock class to the sphinx config that can be used to mock modulesJustus Winter2012-02-10
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Merge commit '0.11.1'David Bremner2012-02-04
|\ | | | | | | | | | | | | | | | | | | Conflicts: NEWS bindings/python/notmuch/database.py bindings/python/notmuch/message.py notmuch.1 NEWS merged by hand, others taken from master.
| * version: bump to 0.11.1David Bremner2012-02-03
| | | | | | | | also semi-automatically update man page and python bindings versions.
| * python: fix error handlingJustus Winter2012-01-23
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. Backported from master to 0.11.
* | python: fix error handlingJustus 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.
* | py3k: add a specialized version of _str for python3Justus 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>
* | Merge branch 'release'David Bremner2012-01-13
|\| | | | | | | | | | | Conflicts: notmuch-reply.c notmuch.1
| * Update version to 0.11David Bremner2012-01-13
| |
| * version: update to 0.11~rc3David Bremner2012-01-09
| | | | | | | | We found another serious-ish bug during freeze.
| * version: bump to 0.11~rc2David Bremner2012-01-02
| | | | | | | | This to "celebrate" pushing a bugfix in at the last minute.
| * version: update version to 0.11~rc1David Bremner2011-12-25
| | | | | | | | and keep python, man page, and debian package in sync.
* | python: str.decode() doesn't like kwargs in python 2.5Sebastian 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: make the result of Message.get_replies() more pythonicJustus Winter2012-01-02
| | | | | | | | | | | | | | | | | | | | | | Formerly Message.get_replies() returned an iterator or None forcing users to check the result before iterating over it leading to strange looking code at the call site. Fix this flaw by adding an EmptyMessagesResult class that behaves like the Messages class but immediatly raises StopIteration if used as an iterator and returning objects of this type from Message.get_replies() to indicate that there are no replies.
* | python: refactor print_messages into format_messages and print_messagesJustus Winter2012-01-02
| |
* | python: add missing conversions from and to utf-8Justus Winter2012-01-02
| |
* | py3k: Add and use a mixin class that implements __str__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 aliasJustus Winter2012-01-02
| |
* | py3k: All strings are unicode strings in py3kJustus Winter2012-01-02
| |
* | py3k: The ConfigParser module has been renamed to configparserJustus Winter2012-01-02
| |
* | py3k: The execfile built-in has been removed in python 3Justus Winter2012-01-02
|/
* Merge branch 'release'David Bremner2011-12-06
|\ | | | | | | | | | | | | Conflicts: NEWS Conflicts resolved by inserting the 0.10.2 stanza before 0.11
| * version: bump for bugfix release 0.10.2David Bremner2011-12-05
| |
* | fix format string in Message.__unicode__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 commentSebastian 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 pointersThomas 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 unicodePatrick Totzke2011-12-06
| |
* | use __unicode__ for string representationPatrick Totzke2011-12-06
| |
* | clean up Thread.__str__Patrick Totzke2011-12-06
| |
* | python: Return a STATUS value in tags_to_flags and flags_to_tagsSebastian 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 importsPatrick Totzke2011-12-06
| |
* | fix sphinx compile-time warningsPatrick Totzke2011-12-06
| | | | | | | | | | no changes to the code, only makes compiling the docs smoother as some rsT syntax errors were fixed
* | pep8 fixesPatrick Totzke2011-12-06
| | | | | | | | no changes to the code, only fixed stuff denounced by `pep8 *py`
* | python: annotate all calls into libnotmuch with typesJustus 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 typesJustus Winter2011-12-01
|/ | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* version: update to 0.10.1David Bremner2011-11-25
|
* version: update to 0.10David Bremner2011-11-23
|
* version: update version info for 0.10~rc2David 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.