Commit graph

386 commits

Author SHA1 Message Date
David Bremner
34e620b91d version: bump to 0.21~rc2 2015-10-19 07:12:18 -03:00
David Bremner
627efac85e version: bump to 0.21~rc1 2015-10-15 08:24:26 -03:00
David Bremner
c44db65669 python: update bindings for new count API
Note that any mismatches are not detected until runtime (if at all)
with the python bindings, so tests are crucial
2015-10-05 19:52:32 -03:00
David Bremner
c66e0d4bc2 version: update to 0.20.2
As usual, bump python version at same time.
2015-06-27 15:05:31 +02:00
David Bremner
dc840338b2 version: bump to 20.1 2015-06-01 21:47:35 +02:00
David Bremner
4bc7fba31b version: bump to 0.20 2015-05-31 11:13:56 +02:00
David Bremner
4f96b5be63 version: bump to 0.20~rc2 2015-05-23 21:03:30 +02:00
David Bremner
36bf31658c python: use absolute import for SOVERSION
Apparently python3 needs this.
2015-05-23 20:59:42 +02:00
David Bremner
fa11a62de0 version: bump to 0.20~rc1 2015-05-04 08:09:43 +02:00
David Bremner
aed5ec4350 python: replace hardcoding of SONAME version
Failing to update this string in globals.py causes failures when the
SONAME changes.  In order to hopefully reduce the number of such
errors, automate the process of setting the SONAME in the python
bindings.
2015-03-08 08:30:36 +01:00
David Bremner
a60aa095d7 version: bump to 0.19 2014-11-14 19:35:44 +01:00
David Bremner
61bae7726d bump version to 0.19~rc2 2014-11-09 16:23:58 +01:00
David Bremner
f310e349df version: update to 0.19~rc1
Sync NEWS debian/changelog at the same time, although in those cases it's a downgrade.
2014-11-06 00:07:45 +01:00
David Bremner
f5db7ad7d2 notmuch 0.18.2 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJUS9DZAAoJEPIClx2kp54s604L/0QXEH2twR9qYKvrc2CHFR7e
 9OX1yVx9A/mq5lFk9Inb6xfIJEcnFnAWkSEAkRwMYgL2705fd+No+UnAdC0HxBYo
 1EoabYGbMiVMbGN0+y/6byqq1YmRDKfRvZFF1WneZyugWyX2lYDjQmRW/g5EdKGb
 TZS2RhY4U18QV/L1ZaherO9yy9Ct0XXvxx+Tio6g5Xx4Hn0jEx0SH+B0gXmqDCwj
 fdy/5nQK7H+0NSD8W7y6z2DCd3SZ72gm8pVyScOZ3CvTaE8K9rIE5F2xpF/rtyra
 Gp+ST9i/hCLwV8YnVfMWhajHjXuZamV75vANgSKWdHGZHuIG9i+ocf0cKdbmhDUK
 6GJtnUMsNENbq1emKu/12lpMGZU5XBh4lg1whX9g5QvFQ6S8FcETFuqbaOTLio91
 d9wy/D+QzJZ/gLijQu/cEFi5pCbKCcaHfUeI48VwoORfdpKxIG007k5wDOwpBbAy
 9g7hte1d9cQquwZyDKyt65CicbJEu8v5ROT+81zBbg==
 =wMbd
 -----END PGP SIGNATURE-----

Merge tag '0.18.2'

notmuch 0.18.2 release
2014-10-25 18:55:25 +02:00
David Bremner
e842030893 version: bump to 0.18.2
No non-documentation changes
2014-10-25 18:23:06 +02:00
David Bremner
ce44657c9e notmuch 0.18.2~rc1 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQGcBAABCAAGBQJUS2vpAAoJEPIClx2kp54svhoL/1kCYjeONhccqb1cyjCVPsC7
 NBGZ48JZNqmDnxrjjz4PgrA9R7h/4R4ViWboCNGFJEbQaPqh89klLa+XiOpaNoyZ
 Y2oP/GrZNXg2TtThehywwWY2w/Q2+bfpyI8C1RnXDuLzvtS6fTpSfGX9+yr7KfUE
 fT56r2V68HHTaTUSFvywKpnRMNnExoa1HT/0EdDRV3v3LqlqALZwgyJAv7hb7EfX
 0a7Q5JChVhQyq+BRq4tKJA2g/n3s54dy3cIBXmSjo8CvOar+GVgrceZ5i1al7Z7x
 D2BDpMfr2qV4fJYapsH+n3fsUhr0LmG651A5A2GdaGUNhLtP28hGPUZpT+ejzTAW
 GOWdlF+PzDCMhdZzqjYQUqN3ROgQsDUcGrwXv+tVv2AoZepSbxyhIeIzU71dD/vx
 5JEP3EVJMwgWbDHKeOzv1+nwzQpMWk8/vxSA9SPN9MBUMkNjaKyrY1YBrX6xtUn0
 l3iglBOdTcqr0uZSVSTU4sODcKtd/w2TlSOSWWnRNA==
 =KuiR
 -----END PGP SIGNATURE-----

Merge tag '0.18.2_rc1'

notmuch 0.18.2~rc1 release

Conflicts:
	NEWS
	debian/changelog
2014-10-25 11:38:18 +02:00
David Bremner
60bbc06ac0 version: bump to 0.18.2~rc1 2014-10-25 11:03:05 +02:00
Thibaut Horel
e13d557bfd python: Add binding for notmuch_query_add_tag_exclude
Implemented as the method `exclude_tag` of the class `Query`. This method takes
one argument, a string containing the name of the tag to exclude.
2014-09-23 18:23:39 +02:00
David Bremner
f6ce18fae9 python: bump SONAME
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.
2014-09-16 20:50:57 +02:00
Peter Wang
ea90d8e043 python: handle return status of database close and destroy
Throw an exception if notmuch_database_close or notmuch_database_destroy
fail.
2014-09-16 20:16:52 +02:00
David Bremner
4276eba3ca version: bump to 0.18.1
Also add precis of NEWS to debian changelog
2014-06-25 07:30:10 -03:00
David Bremner
294f956d86 version: bump to 0.18.1~rc0
Also bump the python bindings version, the NEWS version and the Debian
version.

Since the changelog is (slightly dubiously) metadata, we have to
change it to upload a release candidate.
2014-06-22 21:30:35 -03:00
Amadeusz Żołnowski
175144f6ad Unset html_static_path in Python bindings docs
html_static_path is a kind of source directory and it was set to
destination directory (../html) which caused infinite recursion with
Sphinx 1.2 and above.
2014-05-28 09:46:02 -03:00
David Bremner
b661b87801 version: bump to 0.18
debian changelog to be done seperately.
2014-05-06 16:24:17 +09:00
David Bremner
1f2bb88e92 version: bump for 0.18~rc1
Doing all of the needed version bumps in one commit, and do a
complete, if minimal debian changelog entry
2014-05-04 07:34:00 +09:00
David Bremner
d879c47ff1 python: bump version 2014-04-22 09:40:28 +09:00
David Bremner
ceef57b3d9 version: bump to 0.17 2013-12-30 20:34:23 -04:00
David Bremner
05b534209d version: bump to 0.17~rc4
Unfortunately release-checks.sh will whine a bit because it has not
caught up with the renaming of the version macros.
2013-12-28 18:40:05 -04:00
David Bremner
bb390f89a1 version: bump version
Roll (one last?) release candidate because of Austin's
LIBNOTMUCH_VERSION changes.

Atomically bump the manually (NEWS, debian/changelog) and
automatically (everywhere else) updated places version is mentioned.
2013-12-07 17:07:15 +08:00
David Bremner
6c9cd7d20c version: bump to 0.17~rc2 2013-11-28 21:00:52 -04:00
David Bremner
bd0c56b2bd version: bump to 0.17~rc1
Various other files are synched using "make update-versions".  NEWS
has to be hand edited.
2013-11-23 20:29:46 -04:00
David Bremner
80b25792b2 version: set new version and release date
These are manually set in version and NEWS, and propagate to the other files via
"make update-versions"
2013-07-28 11:28:03 -03:00
Tomi Ollila
acb079e357 Python bindings: CDLL("libnotmuch.3.dylib") on Darwin
Use os.uname() to check for 'Darwin' and load "libnotmuch.3.dylib"
instead of "libnotmuch.so.3" if that is the case.
2013-07-09 08:38:42 +02:00
David Bremner
9a1ab6c487 bindings/python: ignore build subdirectory.
Update .gitignore to make git status less noisy
2013-06-03 08:00:29 -03:00
Austin Clements
45b9b55863 python: Add bindings for notmuch_thread_get_messages 2013-05-05 13:56:39 -03:00
David Bremner
16aa65ba25 Merge branch 'release'
add in NEWS from 0.15.2

Conflicts:
	NEWS
2013-02-18 20:33:48 -04:00
David Bremner
bcccc2e1fe bump versions to 0.15.2 2013-02-17 11:39:46 -04:00
David Bremner
7264732a79 Merge branch 'release'
Conflicts:
	NEWS

Inserted news from 0.15.1
2013-01-24 22:29:09 -04:00
David Bremner
d273ed6cf1 version: bump to 0.15.1
A simple bugfix release, no user visible changes
2013-01-24 07:11:27 -04:00
Justus Winter
c8cb2beda7 python: fix the creation of notmuch databases
Remove the superfluous mode argument given to notmuch_database_create
fixing the creation of notmuch databases using python code.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2013-01-23 18:12:04 +01:00
David Bremner
df9f50185c version: update to 0.15
Bump the version in-place in NEWS.
2013-01-18 21:27:57 -04:00
David Bremner
81866a82ad version: set version to 0.15~rc1
This is in some sense a rollback, but it makes all the automation
happier if the Debian and upstream versions match.
2013-01-16 23:23:00 -04:00
David Bremner
37be45767f version: bump to 0.15
"Atomically" update the python bindings and man page versions.
2013-01-07 21:38:20 -04:00
Justus Winter
db64b67bf8 python: remove now unused import of module sys
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-12-21 14:23:54 +01:00
Justus Winter
0687e2ae23 python: remove functions that have been marked as deprecated in 0.14
Removes Message.{format,print}_messages.

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. The code has been marked as deprecated
in 0.14 and is now removed.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-12-21 10:56:06 +01:00
Justus Winter
8728340644 python: remove Database.db_p
The function has been marked as deprecated in 0.14 and is now removed.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-12-21 10:56:06 +01:00
David Bremner
6442a47361 version: propagate version changes
These are the result of running "make update-versions"
2012-08-21 10:43:49 +02:00
David Bremner
5973881b77 notmuch 0.13.2 release
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iJwEAAECAAYFAk/LdWUACgkQTiiN/0Um85mL8AP/UosXwRabmZT8WjsJ/tPT0N2s
 zIBguJM7jNwnODZ1kFuS5AjxslbsA3SVubWI1rB5CZwINoF0+f+zc1pHHjAjy61R
 XAbSIQsI+2XvnfvDFnLYzyZb6xUX/Q1vczoJ4o2ngLMW5+kkERWYN+T6Ee291c/D
 MTPvV4fuHxvnFAX+Oig=
 =DiJS
 -----END PGP SIGNATURE-----

Merge tag '0.13.2'

notmuch 0.13.2 release
2012-06-03 11:38:08 -03:00
David Bremner
9d5f73db7a version: update to 0.13.2 2012-06-02 18:10:55 -03:00
David Bremner
d99f15d7ee Merge branch 'release' 2012-05-29 09:07:31 -03:00
David Bremner
df96c93239 version: bump to 0.13.1 2012-05-25 21:17:54 -03:00
David Bremner
6d44c5af65 Merge branch 'release'
merge 0.13.1 bugfix patches back to master, fixes for emacs reply and
spurious directory document creation.
2012-05-23 22:48:16 -03:00
Austin Clements
54508eb78d python: Remove find_message_by_filename workaround
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.
2012-05-23 22:32:02 -03:00
Austin Clements
f1f1e39639 python: Update Database.get_directory documentation
notmuch_database_get_directory no longer returns an error for
read-only databases, so remove ReadOnlyDatabaseError from the list of
get_directory exceptions.
2012-05-23 22:31:36 -03:00
Justus Winter
8c123d0da6 python: deprecate Messages.{format,print}_messages
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.15.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 19:10:28 +02:00
Justus Winter
892bb1ee6d python: deprecate Database.db_p
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 19:09:25 +02:00
Justus Winter
8f667be2ac python: fix Message.get_header
8dc8495010 introduced a bug, if the
requested header is not set the underlying notmuch function returns an
empty string that also made the expression true resulting in an
exception being raised. Partly revert the commit to fix this
issue. Testing for equality with None is correct in this case since
the restype of the function Message._get_header is c_char_p so NULL
pointers are in fact converted to None in this case.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 18:23:11 +02:00
Justus Winter
8e3faa7f18 python: add a file abstracting away differences between python 2 and 3
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 18:23:11 +02:00
Justus Winter
643719dfce python: remove the "notmuch binary" section from the docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 17:47:49 +02:00
Justus Winter
8dc8495010 python: Fix the remaining broken NULL pointer tests
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 17:15:49 +02:00
Justus Winter
05c3e83bd2 python: use relative imports
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 16:58:53 +02:00
Justus Winter
5bc5471c54 python: remove unused import of the json module
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-17 16:55:29 +02:00
Justus Winter
b9d1045474 python: remove format_message_as_{json,text} from the sphinx docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:57:45 +02:00
Justus Winter
cd8fe01013 python: remove functions that have been marked as deprecated in 0.13
Removes Message.format_message_{internal,as_json,as_text}.

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. The code has been marked as deprecated
in 0.13 and is now removed.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:55:15 +02:00
Justus Winter
eab15cc707 python: remove notmuch.py
Removes notmuch.py. If someone wants to step up and work on this it
can always be restored using the version control system.

notmuch.py was meant to be a python implementation of the notmuch
utility. It was never finished and hasn't been updated to changes in
the API and bindings and its features and interface haven't been kept
in sync with the notmuch utility.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-05-16 16:55:15 +02:00
David Bremner
3fb08bc125 version: bump to 0.13 2012-05-15 18:18:45 -03:00
Austin Clements
ed4f73a080 python: Update for changes to notmuch_database_get_directory
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.
2012-05-15 08:58:47 -03:00
David Bremner
a4b10675bf bump version to 0.13~rc1 2012-05-08 14:49:08 -03:00
Austin Clements
7bf5be75ae lib: Bump SO version from 2.0.0 to 3.0.0
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
2012-05-05 20:06:09 -03:00
Austin Clements
0a357fe410 python: Update Python bindings for new notmuch_database_{open, create} signatures 2012-05-05 10:13:57 -03:00
Justus Winter
fcfb619b44 python: remove a note stating wrong things about the memory management
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 19:51:16 +02:00
Justus Winter
ca1e232e5f python: document the Database.close function
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>
2012-04-30 19:48:45 +02:00
Justus Winter
e9bcbe7e70 python: deprecate code formatting messages as text and json
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>
2012-04-30 19:27:36 +02:00
Justus Winter
7f74a400d1 python: cleanup the __nonzero__ implementations
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>
2012-04-30 19:25:16 +02:00
Justus Winter
162687a99e python: fix NULL pointer tests
Fix the NULL pointer tests in the destructors of all classes and
Database.create.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 19:24:34 +02:00
Justus Winter
09fdf2b283 python: update the docstrings of Filenames.{__len__,__unicode}
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>
2012-04-30 18:43:02 +02:00
Justus Winter
0803603cdd python: update the docstring of class Filenames
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 18:39:06 +02:00
Justus Winter
60e512d84f python: fix the documentation
Remove the reference to Filenames.as_generator in the sphinx
documentation.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 18:32:32 +02:00
Justus Winter
bbc38c5c11 python: fix Message.get_filenames
Do not to use the removed function Filenames.as_iterator.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-30 18:27:15 +02:00
Justus Winter
e74b1f807b python: remove the deprecated function Filenames.as_generator
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>
2012-04-30 18:13:31 +02:00
Justus Winter
1f08664a6b python: strip superfluous single quote from copyright notices
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:33:06 +02:00
Justus Winter
43ee25f7a9 python: add copyright and licensing information to setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:30:38 +02:00
Justus Winter
51e8e68649 python: stylistic and pep8 fixes in setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:28:50 +02:00
Justus Winter
3ff39766d4 python: update the long description in setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:26:36 +02:00
Justus Winter
99b4ae1a88 python: fix the test asserting that reading the version succeeded
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:21:32 +02:00
Justus Winter
61cf962df8 python: simplify a path expression in setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:18:52 +02:00
Justus Winter
7190b0dbc2 python: Remove unused import from setup.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-29 16:15:41 +02:00
Justus Winter
7bfc4bf501 python: wrap and use notmuch_database_destroy as destructor
Adapt the python bindings to the notmuch_database_close split.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-04-28 09:31:12 -03:00
David Bremner
c302bfa2f6 update version to 0.12
There may be a few NEWS changes after this, but no code (hopefully).
2012-03-19 22:28:17 -03:00
David Bremner
d71cb5e45b bump version to 0.12~rc2 2012-03-18 08:07:00 -03:00
Justus Winter
3a95f3fbc1 python: fix signature of two wrapped libnotmuch functions
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-03-18 07:59:36 -03:00
David Bremner
916aefc2de bump version to 0.12~rc1
As usual, only `version' is edited by hand. The rest of the changes I
blame on the machine.
2012-03-01 07:47:21 -04:00
Justus Winter
d50171d1cc python: split the documentation
Move each classes documentation into its own file and thus into its
own page in the generated documentation.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-24 01:55:33 +01:00
Justus Winter
594dbb6243 python: move the notmuch module section to notes.rst
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-24 01:30:04 +01:00
Justus Winter
8dfbba05fa python: move the usage example to quickstart.rst
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-24 01:18:54 +01:00
Justus Winter
fb52083bf7 python: strip module prefix in the sphinx documentation
Remove the notmuch prefix from classes in the documentation. This
change makes the table of contents look much nicer.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-24 00:38:47 +01:00
Justus Winter
90fb4e8334 python: mention the exception class refactoring in the docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-23 00:14:59 +01:00
Justus Winter
a7561cc20b python: move the exception classes into error.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-23 00:11:22 +01:00
Justus Winter
df0e1cf788 python: rename filename.py into filenames.py
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 22:44:35 +01:00
Justus Winter
76a2db3d7b python: move Threads class into its own file
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 22:39:52 +01:00
Justus Winter
69f077898a python: move Messages class into its own file
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 22:34:40 +01:00
Justus Winter
ba95980cf1 python: refactor the python bindings
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>
2012-02-22 22:06:45 +01:00
Justus Winter
1736488ecf python: work around libnotmuch calling exit(3) in Database.find_message_by_filename
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
05cdb3d7b7 python: improve the docstring of Database.find_message_by_filename
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
fcf19ad029 python: work around libnotmuch calling exit(3) in Database.get_directory
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
35ceaf496f python: Improve the docstring of Database.get_directory
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
92983dd14e python: avoid using a magic value for database mode in Database.__init__
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-22 21:14:35 +01:00
Justus Winter
0b2ff308ec python: fix the type nonsense of the first parameter of class Directory
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 01:06:15 +01:00
Justus Winter
c1094bc2d7 python: allow an empty path as parameter to Database.get_directory
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 00:56:07 +01:00
Justus Winter
786f9882e8 python: remove :returns: keywords from functions returning nothing
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 00:15:59 +01:00
Justus Winter
1737ff5290 python: rework Directory.set_mtime
Fix the indentation within the docstring, remove useless remarks, do
some trivial refactoring.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 00:13:20 +01:00
Justus Winter
798b74e859 python: harmonize the sphinx keyword for exceptions
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-21 00:01:23 +01:00
Justus Winter
a1442952d4 python: refactor the error handling machinery
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>
2012-02-20 23:49:07 +01:00
Justus Winter
4bb9f59ff6 python: fix the projects name and update years of the copyright notice in the sphinx docs
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-20 21:48:35 +01:00
Justus Winter
be851ad39d python: more error handling fixes
This is a follow up commit to 221c7e0b38
fixing more NULL pointer checks.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-19 00:36:15 +01:00
Justus Winter
ab2f9fd828 python: remove trailing whitespace within the documentation source files
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:41:23 +01:00
Justus Winter
bf6039e34e python: improve Query.count_messages docstring
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:39:39 +01:00
Justus Winter
ff8f864245 python: wrap notmuch_query_count_threads as Query.count_threads
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:39:39 +01:00
Justus Winter
4315ac015a python: refactor Query class
Put each libnotmuch function reference right in front of the
corresponding python wrapper.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:13:06 +01:00
Justus Winter
5d69d272c3 python: move Query class to its own file
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:10:45 +01:00
Justus Winter
ff287531ca python: remove unused but imported symbol
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 01:01:33 +01:00
Justus Winter
c471d44837 python: remove unused but imported symbol
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-18 00:57:59 +01:00
Justus Winter
36ce7e3c98 python: implement the context manager protocol for database objects
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-15 22:41:16 +01:00
Justus Winter
b2734519db python: provide a Database.close function
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>
2012-02-15 22:25:13 +01:00
Justus Winter
bb514d7862 py3k: Fix decoding of default database name in Database._get_user_default_db
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-10 22:34:47 +01:00
Justus Winter
ae376c774e python: mock out the ctypes library
This allows rtfd.org to build the documentation without libnotmuch.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-10 18:55:33 +01:00
Justus Winter
8c5be7d12d python: Add a Mock class to the sphinx config that can be used to mock modules
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2012-02-10 18:54:49 +01:00
David Bremner
d43f6c00b3 Merge commit '0.11.1'
Conflicts:
	NEWS
	bindings/python/notmuch/database.py
	bindings/python/notmuch/message.py
	notmuch.1

NEWS merged by hand, others taken from master.
2012-02-04 12:01:46 -05:00
David Bremner
c10b780b44 version: bump to 0.11.1
also semi-automatically update man page and python bindings versions.
2012-02-03 08:32:49 -04:00
Justus Winter
221c7e0b38 python: fix error handling
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.
2012-01-23 07:44:08 -04:00
Justus Winter
8015cbff26 python: fix error handling
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.
2012-01-22 06:14:57 +01:00
Justus Winter
7ddd849015 py3k: add a specialized version of _str for python3
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>
2012-01-16 13:43:11 +01:00
David Bremner
0bbfc5ce8b Merge branch 'release'
Conflicts:
	notmuch-reply.c
	notmuch.1
2012-01-13 20:52:01 -04:00
David Bremner
9ada8335c6 Update version to 0.11 2012-01-13 19:58:36 -04:00
David Bremner
310608f279 version: update to 0.11~rc3
We found another serious-ish bug during freeze.
2012-01-09 07:05:40 -04:00
Sebastian Spaeth
228d8c0528 python: str.decode() doesn't like kwargs in python 2.5
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>
2012-01-02 17:07:53 +01:00
Justus Winter
ada246aa20 python: make the result of Message.get_replies() more pythonic
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.
2012-01-02 17:01:40 +01:00
Justus Winter
e32c8a5e6b python: refactor print_messages into format_messages and print_messages 2012-01-02 16:55:53 +01:00
Justus Winter
83b256b12b python: add missing conversions from and to utf-8 2012-01-02 16:34:56 +01:00
Justus Winter
4a6642a2a1 py3k: Add and use a mixin class that implements __str__
Amended by Sebastian Spaeth <Sebastian@SSpaeth.de> to include the
required sys import in globals.py.
2012-01-02 16:33:29 +01:00
Justus Winter
26d52cf6cf py3k: Rename .next() to __next__(), add python2.x compatibility alias 2012-01-02 16:12:28 +01:00
Justus Winter
9c32ee5372 py3k: All strings are unicode strings in py3k 2012-01-02 16:11:52 +01:00
Justus Winter
4ed0362d41 py3k: The ConfigParser module has been renamed to configparser 2012-01-02 16:08:32 +01:00
Justus Winter
676ce952d3 py3k: The execfile built-in has been removed in python 3 2012-01-02 16:06:59 +01:00
David Bremner
ff58a06e83 version: bump to 0.11~rc2
This to "celebrate" pushing a bugfix in at the last minute.
2012-01-02 06:50:07 -04:00
David Bremner
c616ada489 version: update version to 0.11~rc1
and keep python, man page, and debian package in sync.
2011-12-25 23:09:17 -04:00
David Bremner
f0e0053149 Merge branch 'release'
Conflicts:
	NEWS

Conflicts resolved by inserting the 0.10.2 stanza before 0.11
2011-12-06 19:39:33 -04:00
Patrick Totzke
c4d824bc1e fix format string in Message.__unicode__
Since 2b01161191, 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.
2011-12-06 21:56:40 +01:00
Sebastian Spaeth
50b0d0b8ad python: Remove stray debug comment
This slipped in wrongly in commit 71e0082eff (due to my fault).

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-12-06 13:36:48 +01:00
Thomas Jost
71e0082eff python: use wrapped notmuch_*_t types instead of raw pointers
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
2011-12-06 13:34:30 +01:00
Patrick Totzke
672b6337b4 errors='ignore' when decode to unicode 2011-12-06 13:28:39 +01:00
Patrick Totzke
ffe3097e58 use __unicode__ for string representation 2011-12-06 13:27:08 +01:00
Patrick Totzke
2b01161191 clean up Thread.__str__ 2011-12-06 13:21:42 +01:00
Sebastian Spaeth
ecf8da35e2 python: Return a STATUS value in tags_to_flags and flags_to_tags
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>
2011-12-06 12:38:52 +01:00
Patrick Totzke
86b0aeb1ca remove unused imports 2011-12-06 12:28:35 +01:00
Patrick Totzke
12ebf87947 fix sphinx compile-time warnings
no changes to the code, only makes compiling the docs smoother
as some rsT syntax errors were fixed
2011-12-06 12:23:50 +01:00
Patrick Totzke
4292b1197d pep8 fixes
no changes to the code, only fixed stuff denounced by `pep8 *py`
2011-12-06 12:20:45 +01:00
David Bremner
d7276c6241 version: bump for bugfix release 0.10.2 2011-12-05 18:07:00 -04:00
Justus Winter
3434d19402 python: annotate all calls into libnotmuch with types
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>
2011-12-01 22:24:19 +01:00
Justus Winter
e92b438f46 python: add classes to wrap all notmuch_*_t types
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-12-01 22:24:12 +01:00
David Bremner
f3ad20b20a version: update to 0.10.1 2011-11-25 12:11:04 -05:00
David Bremner
1915c14a3a version: update to 0.10 2011-11-23 07:37:02 -04:00
David Bremner
eb88cd977b version: update version info for 0.10~rc2
Arguably editing debian/changelog violates the "do one thing at a
time" rule, but all of these versions need to be kept in sync.
2011-11-19 08:24:30 -04:00
David Bremner
6b8fd9dd41 version: update to 0.10~rc1
and the usual dance with the python bindings version.
2011-11-15 19:46:08 -04:00
David Bremner
8603396861 version: bump to 0.9
also bump python bindings version.
2011-10-11 21:50:56 -03:00
David Bremner
af1dc7ef48 version: bump to 0.9~rc2
We continue to keep the python bindings version in sync manually
2011-10-07 22:42:18 -03:00
Sebastian Spaeth
dba9c31335 python: Set status in the class definitions
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>
2011-10-05 17:57:46 +02:00
Sebastian Spaeth
5e75398c80 python: help function Query._assert_query_is_initialized
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>
2011-10-05 17:55:30 +02:00
Sebastian Spaeth
42f184c236 python: clean up docstrings and API documentation
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 17:54:09 +02:00
Sebastian Spaeth
a8db280f58 python: whitespace fixed in docstrings
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 17:05:37 +02:00
Sebastian Spaeth
2b43a65c1c python: Add the new exception types in the API documentation
as they should be documented...

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-10-05 16:58:13 +02:00
Sebastian Spaeth
05926adf73 python: Catch up with find_message(by_filename) API changes
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>
2011-10-05 16:44:35 +02:00
Sebastian Spaeth
70479753a6 python: also use libnotmuch.so.2
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>
2011-10-05 15:46:03 +02:00
Thomas Jost
a859d1c866 python: fix Message.get_filenames()
Previously, the Filenames generator only yielded *one* filename before
returning, making Message.get_filenames() behave as Message.get_filename(). This
commit fixes this incorrect behavior: now the generator yields all the
filenames, as expected.
2011-10-01 00:40:20 +02:00
Sebastian Spaeth
8c51525e82 python: rework creating of Subclasses
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>
2011-09-30 16:04:42 +02:00
Justus Winter
b6a01735d2 python: provide more exception classes
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>
2011-09-30 13:58:03 +02:00
Justus Winter
a378a91ba2 python: fix docstring of Message.get_header()
Update the docstring from notmuch.h.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-30 11:08:51 +02:00
Sebastian Spaeth
f63d605835 python: Add new functions in API documentation
Add documentation for the three new functions and add in which version
they have been added.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-29 11:00:43 +02:00
Sebastian Spaeth
eb4cd33e6b python: Improve code documentation
1) Fix added .gitignore from commit dc8a1745 to work on the docs folder
2) Improve in-code developer documentation to produce better
   sphinx-generated documentation. No code changes.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-29 10:47:28 +02:00
Justus Winter
19daa117b9 properly raise exceptions in python bindings
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>
2011-09-29 09:48:06 +02:00
Justus Winter
34990908e7 python: raise a more specific error in Messages.print_messages
Raising Exception is considered bad since the only way to catch
it is to do 'except Exception'. Raising a TypeError is more
appropriate.

Since the format parameter has already been validated, checking
it again is not necessary. Simplify this conditional.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29 09:39:45 +02:00
Justus Winter
f88d985e50 python: rename _verify_dir_initialized to _assert_dir_is_initialized
Rename the function to clarify its effect and remove all the comments
accompanying each call to the function.

Modified by Sebastian Spaeth to apply cleanly again and remove some
blank lines.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-29 09:29:17 +02:00
Justus Winter
94a1bb88aa python: rename _verify_initialized_db to _assert_db_is_initialized
Rename the function to clarify its effect and remove all the comments
accompanying each call to the function.

Modified slightly by Sebastian Spaeth to catch all new instances and
remove some blank lines too.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29 09:23:13 +02:00
Justus Winter
c16e47fe23 python: fix NotmuchError.__str__ if status == None
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>
2011-09-29 09:16:34 +02:00
Justus Winter
fc2d353eeb python: add status and message attributes to NotmuchError
Providing exception objects with meaningful attribute names
is much nicer than using e.args[].

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29 09:07:11 +02:00
Justus Winter
dc8a1745e1 python: add a .gitignore file and refine the toplevel one
The line 'notmuch' in the toplevel .gitignore file is to broad
and matches bindings/python/notmuch making it cumbersome to
git-add files within that directory.

Refine the toplevel file to only match the generated notmuch
executable and add a more specialized .gitignore file to the
python directory.

Signed-off-by: Justus Winter <4winter@informatik.uni-hamburg.de>
2011-09-29 09:04:50 +02:00
Sebastian Spaeth
0241a68e9e python: add begin|end_atomic bindings
* 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>
2011-09-28 18:31:49 +02:00
Sebastian Spaeth
2c76279cda python: Add database_find_message_by_filename bindings
Add it :-)

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-28 18:31:36 +02:00
David Bremner
78d39a0908 version: bump to 0.9~rc1
This version number change should not be taken as definitive, rather
refer to the signed tag.
2011-09-24 20:00:29 -03:00
Martin Owens
8e7a108363 python: Ensure that we pass utf-8 encoded string to libnotmuch
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>
2011-09-16 13:19:14 +02:00
David Bremner
24fc8f97e8 update versions for release 0.8
See commit 6979b65 for more discussion.
2011-09-10 08:55:33 -03:00
David Bremner
6979b6533a update versions for release candidate
we now have three files to keep in sync. That seems wrong, but I guess
we will live with it for now.

The main problem is that the python code is distributed separately, so
it can't get the version from 'version'.

The choice ~rcX is for convenience with debian versioning.
2011-09-06 22:55:01 -03:00
Sebastian Spaeth
e2e0d487ba python: Make Database take unicode paths
Decode and Encode from/to unicode objects as required to be able to take
unicode path names. Previously we would error out when an unicode object
were handed it.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-05 15:52:12 +02:00
Sebastian Spaeth
5dc189c82d python: Have setup.py read the version number without importing
Importing the notmuch module in setup.py is a no-no, and we want
to auto-generate the version number in the release process.

Outsource __VERSION__ to the new version.py which contains nothing else
and which can therefor easily be autogenerated. Have setup.py read in
the file via execfile and test if importing the version number actually
worked.

This should make all happy.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-08-24 09:13:34 +02:00
Sebastian Spaeth
2fceb738c7 python: Updated development status and wording in setup.py
We are beyond pre-alpha, and the Requirements wording could take some
tweaking. Done.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-08-24 09:01:50 +02:00
Sebastian Spaeth
73f104445b Revert "python: Simplify setup.py"
This reverts commit 8826fc2d7b.

It seems that importing the module in setup.py is controversial at best,
as it will fail for users that don't have all dependencies
installed. This was the case in e.g. the Ubuntu autobuilder, so building
notmuch failed. The plan is to create an autogenerated setup.py that can
be used for version information.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-08-24 08:54:58 +02:00
Sebastian Spaeth
8826fc2d7b python: Simplify setup.py
We were using a template setup.py which parsed __init__.py in complex
ways just to find out the version number. Simply import notmuch and use
__VERSION__ directly. Also adapt some wording and setup.py values while
going through.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-08-23 09:30:49 +02:00
pazz
f10ec87cc3 python: Fix unsafe utf-8 decodings
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>
2011-08-17 14:44:45 +02:00
patrick
ee4579ad27 decode headers from utf-8 to unicode
as mail headers are stored as utf-8 in the index,
it is safe to return them as unicode strings directly
2011-08-15 15:48:50 +02:00
Sebastian Spaeth
dc6b2b4382 python: remove Tags().__len__() implementation
len() exhausts the tag iterator and e.g. list() or "".join(tags)
implicitly call len() if existing and then failing. So, we remove
Tags.__len__().

If you need to know the number of tags a message has, do use
len(list(tags)). It would be nicer to be able to support len() directly...

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-08-09 17:48:27 +02:00