-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Built Chaco may be binary-incompatible with older NumPy versions #778
Comments
We'll have the same issue with Enable. @rahulporuri or @aaronayres35: can I leave it to one of you to open an equivalent issue for that repository? |
Ah, this looks really interesting: https://github.com/scipy/oldest-supported-numpy. It looks as though the fix may be as simple as replacing What I don't know is whether we'll have similar issues with Cython. |
IIUC, Cython is not a runtime dependency though, so there shouldn't be any conflicts(?) My initial understanding of the issue is that we may build with |
Ah, good point; yes, I think we're probably fine with Cython then. |
PR #730 introduced a
pyproject.toml
that declares build dependencies - this means that apip install chaco
will automatically first install NumPy, instead of just failing because NumPy isn't present in the build environment.But there's a subtle problem here: with the current
pyproject.toml
,pip install chaco
will build Chaco against the latest release of NumPy available from PyPI (regardless of any version of NumPy that happens to already be in the environment)The result is that the built Chaco may segfault if installed into an environment whose NumPy version is not the latest NumPy.
As a general rule, extension modules built against earlier versions of NumPy can reasonably be expected to be ABI-compatible with later versions of NumPy, but not the other way around.
A possible solution is to pin the NumPy version (just to the minor version, not the bugfix level) used for the build to the earliest NumPy version that we might want to support. This is the approach taken in
ibm2ieee
, for example.See also previous discussion in #467.
xref: enthought/ibm2ieee#7, enthought/ibm2ieee#8, enthought/ibm2ieee#9, enthought/ibm2ieee#10
further reading: pypa/pip#6144, pypa/pip#4582, numpy/numpy#5888
The text was updated successfully, but these errors were encountered: