[pypy-dev] Boost.Python and PyPy -- status?

Toby St Clere Smithe mail at tsmithe.net
Thu Jan 9 22:19:57 CET 2014


Hi fijal,

Maciej Fijalkowski <fijall at gmail.com> writes:
> I'm less optimistic. Boost::Python uses tons of internal stuff as far
> as I know. We really discourage people from using it, because it's a)
> slow b) prone to not behave exactly like CPython and c) be incomplete.

That's a shame, not least because boost::python is what my extension is
written with. It's an elegant library, and exposes the Python API in a
nice C++ idiom. The code I'm interfacing with uses a number of C++
features, and boost::python deals with these in a clean way. I'm
thinking of attempting a Cython version, but I won't have time for that
for at least 6 to 8 months, and it would be a shame to give up what I've
got.

But I suspect you have reason not to be optimistic: part of the appeal
of boost::python is the way that it makes dealing with the differences
between C++ and Python object semantics mostly transparent, but because
CPython uses ref-counting garbage collection, and so then does the
default boost::python object policy, it'll probably struggle with PyPy.

Cheers,

Toby




More information about the pypy-dev mailing list