Boost.Python 1.33.1 and static __doc__ properties

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Boost.Python 1.33.1 and static __doc__ properties

Andrew Buza
I have a set of libraries that I've been trying to build for Python 2.7 using the 1.33.1 release of Boost.Python. I've used them in the past with Python 2.4, but Py2.6 made the __doc__ property on classes read-only. Because of this change I get an AttributeError (with the message "'Boost.Python.StaticProperty' object attribute '__doc__' is read-only") when I try to import the module. There's another post to this mailing list about this issue at http://mail.python.org/pipermail/cplusplus-sig/2009-August/014747.html but it doesn't look like it was ever resolved.

I've tried removing explicit docstrings from my source to see if I could avoid that but things like .def_readonly appear to add them implicitly. Updating to a newer Boost release is the obvious answer but that's extremely painful for a number of reasons, one them being a handful of patches that have been applied to the my local Boost 1.33.1 release that I'd need to port to the latest version.

I'd like to modify Boost.Python 1.33.1 to avoid setting static properties and I've made a few attempts at that but I haven't been successful so far. Could someone more familiar with the code tell me if this is a reasonably simple modification and maybe point me in the right direction?

_______________________________________________
Cplusplus-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/cplusplus-sig