You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As is explained here, Numpy 1.20 introduced a change to its C API. This affects Python packages with compiled components that depend on Numpy, such as axographio. The version of Numpy installed at compile time can limit the versions of Numpy compatible with the package at run time. That is:
The API changes are not backwards-compatible: If axographio is built with Numpy 1.20, the wheel will not be compatible with installations running older versions of Numpy.
Numpy 1.20 is still compatible with older wheels: If axographio is built with Numpy 1.19, the wheel will still be compatible with installations running newer versions of Numpy.
Unaware of any of this, today I published a new wheel for Python 3.9 to PyPI (axographio-0.3.1-cp39-cp39-win_amd64.whl). I had Numpy 1.20 installed when building. The wheel is incompatible with Python 3.9 installations running Numpy 1.19, resulting in this error when trying to read a file:
ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
Because setup.py does not indicate a run-time requirement of Numpy 1.20, anyone installing axographio into an environment with Python 3.9 and Numpy 1.19 or older will get a broken version of axographio.
I don't have the privileges on PyPI needed to replace or delete the bad wheel. To work around this, I plan to release a new version of axographio built with Numpy 1.19, which should be compatible with Numpy 1.20 too. The only change will be a version number bump.
The text was updated successfully, but these errors were encountered:
Numpy 1.20 introduced a backwards-incompatible change to its C API, such that wheels built with Numpy 1.20 are incompatible with installations running Numpy 1.19 or older. To avoid problems like issue #8 in the future, axographio will now require Numpy 1.20 or later.
The plan seems to have worked. Release 0.3.2, built with Numpy 1.19, works with both Numpy 1.19 and 1.20. I will close this issue now, but this could become a problem again in the future unless the project shifts to requiring Numpy 1.20 or later. I have opened PR #9, which can be included in the next release.
As is explained here, Numpy 1.20 introduced a change to its C API. This affects Python packages with compiled components that depend on Numpy, such as axographio. The version of Numpy installed at compile time can limit the versions of Numpy compatible with the package at run time. That is:
Unaware of any of this, today I published a new wheel for Python 3.9 to PyPI (
axographio-0.3.1-cp39-cp39-win_amd64.whl
). I had Numpy 1.20 installed when building. The wheel is incompatible with Python 3.9 installations running Numpy 1.19, resulting in this error when trying to read a file:ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject
Because
setup.py
does not indicate a run-time requirement of Numpy 1.20, anyone installing axographio into an environment with Python 3.9 and Numpy 1.19 or older will get a broken version of axographio.I don't have the privileges on PyPI needed to replace or delete the bad wheel. To work around this, I plan to release a new version of axographio built with Numpy 1.19, which should be compatible with Numpy 1.20 too. The only change will be a version number bump.
The text was updated successfully, but these errors were encountered: