Kelm, Peter ST/HZA-TG
2009-Apr-28 15:40 UTC
[Xapian-devel] xapian bindings for Python 3.0?
Hello, does anybody have working xapian bindings for Python 3.0. It does compile for me - but I cannot get it to work. It fails in smoketest(3).py at: "stem = xapian.Stem("english")" stating an ArgError for "std::string const &" originating in "new_Stem". My debugging efforts indicate that it might have to do with the way SWIG handles Python unicode strings. Xapian version: 1.0.11 Platform: Windows XP / Visual Studio Express 2008 Thanks & Best Regards, Peter
Try using Perl it work the best from scripting languages and is faster than Python. Kevin Duraj On Tue, Apr 28, 2009 at 8:40 AM, Kelm, Peter ST/HZA-TG <kelmpte at schaeffler.com> wrote:> Hello, > > does anybody have working xapian bindings for Python 3.0. It does > compile for me - but I cannot get it to work. It fails in > smoketest(3).py at: "stem = xapian.Stem("english")" stating an ArgError > for "std::string const &" originating in "new_Stem". > > My debugging efforts indicate that it might have to do with the way SWIG > handles Python unicode strings. > > Xapian version: 1.0.11 > Platform: Windows XP / Visual Studio Express 2008 > > Thanks & Best Regards, > > Peter > > _______________________________________________ > Xapian-devel mailing list > Xapian-devel at lists.xapian.org > http://lists.xapian.org/mailman/listinfo/xapian-devel >
On Tue, Apr 28, 2009 at 05:40:03PM +0200, Kelm, Peter ST/HZA-TG wrote:> Xapian version: 1.0.11 > Platform: Windows XP / Visual Studio Express 2008As the README file for xapian-bindings 1.0.11 says: Python Requires Python 2.2 or later. Python 3 probably won't be supported by 1.0.x, but will by 1.1.x. [...] The 1.1.0 development release nominally has Python 3 support, but it's currently marked as experimental as hasn't had much testing and the wrapped API may change a little still, and also it failed to build with Python 3.0.1 when Richard tried shortly before the release. This ticket is tracking the status of Python 3 support: http://trac.xapian.org/ticket/346 If you (or anyone else) want to help out, that would be great. We're not currently intending to add Python 3 support to 1.0.x, although once Python 3 support in 1.1.x has stabilised, if someone sufficiently motivated were to come up with a suitable patch for backporting it to 1.0.x we'd certainly consider it. But note that a newer version of SWIG is required to generate the Python 3 wrappers than the one we're currently using for 1.0.x, which is potentially disruptive to the other SWIG-generated bindings. So either you'd need to prove that any differences in the wrappers for other languages are harmless or beneficial, or adjust the build system to use a different SWIG install for Python 3. Cheers, Olly