
Yes, I agree. On Sun, Apr 13, 2025 at 6:53 AM Tom Kacvinsky via Boost < boost@lists.boost.org> wrote:
On Sun, Mar 16, 2025 at 9:48 PM Tom Kacvinsky <tkacvins@gmail.com> wrote:
While working on a project to upgrade an embedded Python interpreter (to Python 3.12), which uses boost::python, I noticed the structs from the Python C API now have more members and those extra struct members were not populated in the boost::python code. In particular I was bit by the enum module crashing our application startup.
I noticed this with boost 1.78, but I found the same problematic code in the release that was current as of two months ago (1.87.0, I think).
I got things to compile and run, but my approach was to just make the code Python 3.12 compliant. I can prepare a patch that has the appropriate macro
guards for populating the structs as they relate to different Python
versions.
I'll read the boost developers guide and follow the necessary steps to submit a fix.
I discovered PYTHON_API_VERSION is not a good test for populating the PyTypeObject as that version is the same for Python 3.0 and higher. So I'm thinking that PY_VERSION_HEX might be the appropriate macro guard for the changes in the PyTypeObject struct. Thoughts?
Thanks,
Tom
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
-- ...ich hab' noch einen Koffer in Berlin...