bpo-41861: Clean up sqlite3 header files wrt. PEP 384 by erlend-aasland · Pull Request #22419 · python/cpython
PyMemberDef not part of the stable API
structmember.h is part of the limited C API. If it should not, I suggest to first exclude it from the limited C API, before changing _sqlite3 header files.
I think that the "not part of the stable API" comment was a reference to bpo-2897. According to PEP 384, PyMemberDef is indeed a part of the stable (limited?) C API, however PyMemberDef is defined in structmember.h, and PEP 384 states that you're allowed to include Python.h only. Referenced in the bpo, there's a (huge) PR (#20462) that deprecates structmember.h and moves its content to descrobject.h.
The current situation is such that PEP 384 is self-contradicting when it comes to header files and structures. However, I guess that PEP 384 compliance is not as strict for built-in modules as it is for third party modules?
So, should bpo-2897 be resolved first before continuing with this PR?