Skip to content

DOC: add guide for downstream package authors#18505

Merged
charris merged 3 commits intonumpy:masterfrom
rgommers:doc-downstream
Feb 28, 2021
Merged

DOC: add guide for downstream package authors#18505
charris merged 3 commits intonumpy:masterfrom
rgommers:doc-downstream

Conversation

@rgommers
Copy link
Copy Markdown
Member

This is a follow-up to the approach to specifying versions of numpy to depend on worked out in scipy/scipy#12862. And it adds a bit about testing against NumPy nightlies.


If a package either uses the NumPy C API directly or it uses some other tool
that depends on it like Cython or Pythran, NumPy is a *build-time* dependency
of the package. Because the NumPy ABI is only forward-compatible, you must
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is backwards-campatible. It would be a good idea to explain what these terms mean, i.e., C extensions compiled against older NumPy will run on newer NumPy, but not the other way around. This conflicts a bit with the ABI, which may change due to deprecated and removed functions. We do try to insure that there are workarounds in older NumPy for such problems.

Copy link
Copy Markdown
Member Author

@rgommers rgommers Feb 28, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to look it up, but I'm pretty sure I remembered correctly. It's counter-intuitive, because the meaning usage is opposite for API vs. ABI. From https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html:

Extending existing, stable ABIs. Versioning gives subsequent releases of library binaries the ability to add new symbols and add functionality, all the while retaining compatibility with the previous releases in the series. Thus, program binaries linked with the initial release of a library binary will still run correctly if the library binary is replaced by carefully-managed subsequent library binaries. This is called forward compatibility.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I did get it wrong higher up.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix higher up

@charris charris merged commit 6c79e97 into numpy:master Feb 28, 2021
@charris
Copy link
Copy Markdown
Member

charris commented Feb 28, 2021

Thanks Ralf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants