scholrly/lucene-querybuilder — pull request #17 by bluepeppers (2013-07-27 12:22:34+00:00)
Title: Add support for Python 3.x

No actual changes or anything interesting, just supporting new APIs where required. Passes all tests except the equality test, which seems to be flawed in python 2.x also afaict. I get strange results like this on python 3.3 and 2.7:

>>> import sys
>>> sys.version_info
sys.version_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
>>> from lucenequerybuilder import Q
>>> q1 = Q("a") & Q("b") | Q("c")
>>> q1 == (q1 | Q("d"))
True
>>> q1 != (q1 | Q("d"))
True

This seems to be a general problem with testing equality with queries that are joined. I've not delved too deep into the code base, but I'm presuming that the hashed tuple in `__hash__` should include `_or` and `_and`.