[Numpy-discussion] Migrating code to eliminate references to numpy/core/include/numpy/npy_3kcompat.h (?)

Charles R Harris charlesr.harris at gmail.com
Fri Aug 21 22:49:06 EDT 2020


On Fri, Aug 21, 2020 at 3:32 PM Otto Hirr <ottohirr at gmail.com> wrote:

> Greetings,
>
> 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.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20200821/95f22508/attachment.html>


More information about the NumPy-Discussion mailing list