On Thu, 9 Jan 2025, Ben Harris wrote:
The attached patch switches init_py_module() to use PyObject_GetOptionalAttr() in place of PyObject_GetAttrString().
...
However, this is not really a good fix. Any other exception raised by PyObject_GetOptionalAttr() will still be ignored, and will presumably emerge in init_py().
*sigh* Both of those mentions of PyObject_GetOptionalAttr() should refer to PyObject_GetOptionalAttrString() instead. Apologies for my confusion.
-- Ben Harris