[Xapian-tickets] [Xapian] #346: Python 3 support
Xapian
nobody at xapian.org
Mon Jul 20 17:10:21 BST 2009
#346: Python 3 support
-----------------------------+----------------------------------------------
Reporter: olly | Owner: richard
Type: defect | Status: new
Priority: high | Milestone: 1.1.2
Component: Xapian-bindings | Version: SVN trunk
Severity: normal | Keywords:
Blockedby: | Platform: All
Blocking: |
-----------------------------+----------------------------------------------
Comment(by kelm):
The patch was just enough to get Xapian functional for me (for the
moment). There was no intention on my side to claim that it it solves
everything. Actually, it is obvious that commenting out (very few)
testcases cannot be "it". Nevertheless it demonstrated progress in moving
towards Py3k support.
Please note that I haven't delved into it for a while, so please bear with
me if I forgot something:
The __new__ warning stems from an incomplete iterator interface (from
py3ks point of view). The __next__ and __len__ changes are essential to
comply to the modified py3k iterator interface. I'm no too surprised that
it did not work without them...
The reason for changes like:
{{{
MSet.__len__ = MSet.size
}}}
to
{{{
MSet.__len__ = lambda self, *args: MSet.size(self, *args)
}}}
was to work around a change in py3k - the removal of support for "unbound
methods". It might well be that the *args parameter is not needed in this
case...
--
Ticket URL: <http://trac.xapian.org/ticket/346#comment:11>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list