On Sun, Jun 30, 2019 at 12:26 AM Nick Coghlan
Hence Jeroen's point: if something is useful enough for Cython to want to use it, it makes to provide a public API for it that hides any internal implementation details that may not remain stable across releases.
I wanted to discuss about only when PyAPI_FUNC() is needed, not about which function should be public. But FYI, we have moved _PyObject_GetMethod to private to cpython API already.
We don't expect most Cython code to be regenerated for different versions - we only expect it to be recompiled, as with any other extension.
We don't make some unstable API public to avoid breaking packages.
But it seems Cython choose performance over stable source code.
It seems "regenerate source code when it broken" is Cython policy.
It is out of our control.
For example, FastCall APIs were not public because we don't think it's
not stable yet and it can be changed in future versions. But Cython used it.
Luckily, it isn't broken so much. But it is just lucky.
I hope Cython provides option to produce more stable source code for projects
distributing generated C source code instead of a binary wheel
or Cython source code.
Regards,
--
Inada Naoki