aboutsummaryrefslogtreecommitdiffhomepage
path: root/bindings/python/notmuch
Commit message (Collapse)AuthorAge
...
* python: deprecate code formatting messages as text and jsonGravatar Justus Winter2012-04-30
| | | | | | | | | This code adds functionality at the python level that is unlikely to be useful for anyone. Furthermore the python bindings strive to be a thin wrapper around libnotmuch, so this code will be removed in notmuch 0.14. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: cleanup the __nonzero__ implementationsGravatar Justus Winter2012-04-30
| | | | | | | | | | | Cleanup the code, reword the docstring and use the same implementation in the Threads, Tags and Messages classes. __nonzero__ implements truth value testing. If __nonzero__ is not implemented, the python runtime would fall back to `len(..) > 0` thus exhausting the iterator. 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: update the docstrings of Filenames.{__len__,__unicode}Gravatar Justus Winter2012-04-30
| | | | | | | Formerly the documentation was overly verbose. Reword the comment and use the same for both functions. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: update the docstring of class FilenamesGravatar Justus Winter2012-04-30
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: fix Message.get_filenamesGravatar Justus Winter2012-04-30
| | | | | | Do not to use the removed function Filenames.as_iterator. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: remove the deprecated function Filenames.as_generatorGravatar Justus Winter2012-04-30
| | | | | | | | | | Remove the function Filenames.as_generator that has been marked as deprecated in 0.12. The class Filenames implements the iterator protocol so you can directly iterate over such objects instead. 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: wrap and use notmuch_database_destroy as destructorGravatar Justus Winter2012-04-28
| | | | | | Adapt the python bindings to the notmuch_database_close split. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* update version to 0.12Gravatar David Bremner2012-03-19
| | | | There may be a few NEWS changes after this, but no code (hopefully).
* bump version to 0.12~rc2Gravatar David Bremner2012-03-18
|
* python: fix signature of two wrapped libnotmuch functionsGravatar Justus Winter2012-03-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* bump version to 0.12~rc1Gravatar David Bremner2012-03-01
| | | | | As usual, only `version' is edited by hand. The rest of the changes I blame on the machine.
* python: move the exception classes into error.pyGravatar Justus Winter2012-02-23
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: rename filename.py into filenames.pyGravatar Justus Winter2012-02-22
| | | | 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: refactor the python bindingsGravatar Justus Winter2012-02-22
| | | | | | | | Move the Directory class into its own file, merge the two Filenames classes into one, deprecate Filenames.as_iterator, update the documentation accordingly. Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: work around libnotmuch calling exit(3) in ↵Gravatar Justus Winter2012-02-22
| | | | | | Database.find_message_by_filename Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: improve the docstring of Database.find_message_by_filenameGravatar Justus Winter2012-02-22
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: work around libnotmuch calling exit(3) in Database.get_directoryGravatar Justus Winter2012-02-22
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: Improve the docstring of Database.get_directoryGravatar Justus Winter2012-02-22
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: avoid using a magic value for database mode in Database.__init__Gravatar Justus Winter2012-02-22
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: fix the type nonsense of the first parameter of class DirectoryGravatar Justus Winter2012-02-21
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: allow an empty path as parameter to Database.get_directoryGravatar Justus Winter2012-02-21
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: remove :returns: keywords from functions returning nothingGravatar Justus Winter2012-02-21
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: rework Directory.set_mtimeGravatar Justus Winter2012-02-21
| | | | | | | Fix the indentation within the docstring, remove useless remarks, do some trivial refactoring. 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: improve Query.count_messages docstringGravatar Justus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: wrap notmuch_query_count_threads as Query.count_threadsGravatar Justus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: refactor Query classGravatar Justus 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 fileGravatar Justus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: remove unused but imported symbolGravatar Justus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: remove unused but imported symbolGravatar Justus Winter2012-02-18
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: implement the context manager protocol for database objectsGravatar Justus Winter2012-02-15
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* python: provide a Database.close functionGravatar Justus 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_dbGravatar Justus Winter2012-02-10
| | | | Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
* Merge commit '0.11.1'Gravatar 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.1Gravatar David Bremner2012-02-03
| | | | | | | | also semi-automatically update man page and python bindings versions.
| * python: fix error handlingGravatar Justus 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 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.
* | 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>
* | Merge branch 'release'Gravatar David Bremner2012-01-13
|\| | | | | | | | | | | Conflicts: notmuch-reply.c notmuch.1
| * Update version to 0.11Gravatar David Bremner2012-01-13
| |
| * version: update to 0.11~rc3Gravatar David Bremner2012-01-09
| | | | | | | | We found another serious-ish bug during freeze.
* | 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: make the result of Message.get_replies() more pythonicGravatar Justus 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_messagesGravatar Justus Winter2012-01-02
| |