Several iterators in the Python cFFI API destroyed the objects they iterated
over too early (when the iterator was exhausted), causing subsequent segfaults
in common cases like creating a list from the iterator. This patch fixes the
segfaults and add tests to ensure that they don't happen again.
Existing users of the legacy python bindings use
message.get_flags(Message.FLAG.MATCH) to determine which messages in a
thread matched. Since the bindings don't provide get_flags anymore,
they should provide a property analogous to the existing "excluded"
property.
This introduces CFFI-based Python3-only bindings.
The bindings aim at:
- Better performance on pypy
- Easier to use Python-C interface
- More "pythonic"
- The API should not allow invalid operations
- Use native object protocol where possible
- Memory safety; whatever you do from python, it should not coredump.