On Fri, Aug 21, 2020 at 3:32 PM Otto Hirr email@example.com wrote:
tl;dr: Need to remove npy_3kcompat.h from any source code location since Python2 is no longer supported.
Background: Ran into an error after compiling various apps regarding npy_PyErr_ChainExceptionsCause() being undefined at runtime.
Poking around shows that this is related to npy_3kcompat.h, which seems to be for Python2 compatibility. (There is a differently named counterpart for Python3.)
This seems to be used in a couple of numpy/core/src/multiarray files.
Seems that since Python2 is no longer supported, cleaning up cruft of P2 will improve code and should eliminate the problem I ran into, (or else move an error report to something else...)
Is this reasonable to eliminate?
The migration is already underway, but will take time. Even after NumPy is clean we will keep it because we also need to maintain compatibility across Python 3 versions and to avoid breaking downstream projects who might be using it.