Surely your project hasn't been approved by Google yet? Otherwise, good to see such progress. BPL always had hard to find resource leaks because of the lack of Py_Finalize support - I used to Glowcode my bindings and I was never quite sure where leaks came from. None were serious mind e.g. hanging onto a C++ object after it was supposed to die.
Good stuff, but don't go too far without Google funding unless you're happy doing this this summer anyway. Niall On 2 Apr 2009 at 4:07, Haoyu Bai wrote: > Hi, > > I did some preliminary work on BPL py3k support in these days. > > With Troy's help we have a py3k SVN tree in sandbox now, which is > branched from trunk. I also tried to compile BPL with Python 3, and by > following the error report of the compiler, I did some patch - now we > have 14 .cpp files out of 28 in total can be compiled. The patch is > committed, you can see it here: [2]. Please point me out if the code > has something don't conform to Boost coding policy. There's also > something interesting, maybe a bug I caught, for example: (Search the > changeset to see details) > > 39 // XXX(bhy) Potentional memory leak here since > PyObject_GetAttrString returns a new reference > 40 // const char *mod = > PyString_AsString(PyObject_GetAttrString( self_, > const_cast<char*>("__module__"))); > 41 PyObject *mod = PyObject_GetAttrString( self_, > "__module__"); > > Also I found some potential problem with Py_ssize_t, I will take this > as a chance to fix them. > > The biggest problem I see still is the "Text Vs. Data Instead Of > Unicode Vs. 8-bit" in py3k. As we discussed and the suggestion by > Niall [3], we have a clear solution for this and I will work towarding > this. The other changes in py3k such as PyObject_HEAD change, int type > removal and unbound method removal also affected Boost.Python's code, > but they don't require logical change of BPL code and easy to handle. > > Hopefully in the end of this summer, we will have a Boost.Python > library with Python 3 support! > > Thanks again for many people's help! > > References: > [1] https://svn.boost.org/trac/boost/browser/sandbox-branches > [2] https://svn.boost.org/trac/boost/changeset/52118 > [3] "Nabble - Python - c++-sig - Some thoughts on py3k support," > http://www.nabble.com/Some-thoughts-on-py3k-support-td22564813.html. > > -- Haoyu Bai > _______________________________________________ > Cplusplus-sig mailing list > Cplusplus-sig@python.org > http://mail.python.org/mailman/listinfo/cplusplus-sig _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig