On Jul 21, 2010, at 12:18 AM, Thomas Koch wrote:
> The question remains if it's feasible to support 2.x *and* 3.x - as Bill
> mentioned "... I'd like to make it work on both." - me too. I did fear that
> this makes things much more complicated and you end up with code "if
> lucene.VERSION.split('.')[0]>2: ... else ..." - we did that some time ago
> during GCJ and JCC based versions of PyLucene, but at that time it was
> merely a matter of different imports and init stuff (initVM).
>
> But I understand now that as long as you remove deprecated code from 2.9 it
> *should* work with 2.9 and 3.0 as well! Right?
It's certainly possible, but there are some gotchas. I've been maintaining
2.4, 2.9, and 3.0 for my project (http://code.google.com/p/lupyne/), and just
recently dropped 2.4 support.
The conditional checks that are still left involve the Python* overrides.
There are several in 2.9 that still wrap the deprecated method or class, and of
course they're missing in 3.0. The ones I remember are PythonHitCollector,
PythonFilter.bits, and PythonTokenFilter iteration.