| Commit message (Collapse) | Author | Age |
|\
| |
| |
| |
| | |
merge 0.13.1 bugfix patches back to master, fixes for emacs reply and
spurious directory document creation.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Now that notmuch_database_find_message_by_filename works on read-only
databases, remove the workaround that disabled it on read-write
databases.
This also adds a regression test for find_message_by_filename.
|
| |
| |
| |
| |
| |
| | |
notmuch_database_get_directory no longer returns an error for
read-only databases, so remove ReadOnlyDatabaseError from the list of
get_directory exceptions.
|
| |
| |
| |
| | |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
| |
| |
| |
| | |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
| |
| |
| |
| | |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|/
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
| |
notmuch_database_get_directory now returns
NOTMUCH_STATUS_READ_ONLY_DATABASE on its own (rather than crashing) so
the workaround in Database.get_directory is no longer necessary.
|
|
|
|
| |
signatures
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
|
|
| |
Put a prominent warning into the docstring of Database.close, make the
function show up in the sphinx doc and refer to the warning in the
paragraph mentioning the context manager protocol.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
|
| |
Fix the NULL pointer tests in the destructors of all classes and
Database.create.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
| |
Adapt the python bindings to the notmuch_database_close split.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Database.find_message_by_filename
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
|
| |
Fix the indentation within the docstring, remove useless remarks, do
some trivial refactoring.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
This is a follow up commit to 221c7e0b38177f5f1dbf0561580c15e8aaa49004
fixing more NULL pointer checks.
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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>
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
This slipped in wrongly in commit 71e0082eff (due to my fault).
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
no changes to the code, only makes compiling the docs smoother
as some rsT syntax errors were fixed
|
|
|
|
| |
no changes to the code, only fixed stuff denounced by `pep8 *py`
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
| |
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Add documentation for the three new functions and add in which version
they have been added.
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
|