Skip to content

NEP: Create draft NEP for C-API evolution - #23579

Merged
charris merged 3 commits into
numpy:mainfrom
seberg:c-api-nep
May 24, 2023
Merged

charris merged 3 commits into
numpy:mainfrom
seberg:c-api-nep

Conversation

@seberg

@seberg seberg commented Apr 13, 2023

Copy link
Copy Markdown
Member

This NEP draft outlines some example changes briefly, but mainly I hope to make a case for:

  • requiring recompliation
  • introducing a numpy2_compat module (or similar)

And just describe roughly how it would work. I am not going to deep into the how since I don't see what can go wrong, but we can expand if anyone is worried about details.

(It may be a bit repetitive at times, but...)


This is a first draft, but maybe its already pretty far along or maybe a lot of details are missing and other things are just duplicated :). Feedback welcome!

This NEP draft outlines some example changes briefly, but mainly
I hope to make a case for:

* requiring recompliation
* introducing a `numpy2_compat` module (or similar)

And just describe roughly how it would work.  I am not going to
deep into the how since I don't see what can go wrong, but we can
expand if anyone is worried about details.

(It may be a bit repetitive at times, but...)

@mhvk mhvk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

All makes a lot of sense. One typo and one query that probably is not relevant but perhaps can lead to a bit of clarification.

Comment thread doc/neps/nep-0053-c-abi-evolution.md Resolved
Comment thread doc/neps/nep-0053-c-abi-evolution.md Outdated

#define NPY_TARGET_VERSION NPY_1_22_API_VERSION

to select the version they which to compile for (lowest version to be

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

which -> wish

Comment thread doc/neps/nep-0053-c-abi-evolution.md Outdated
to select the version they wish to compile for (lowest version to be
compatible with).
This will default to an old version that should cover most or all use-cases.
The version will be chosen to always be compatible with :ref:`NEP 29 <NEP29>`.

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.

As a follow-up (to the discussion above). I am currently planning to change this away from NEP 29 again to a very conservative default based on "oldest NumPy compatible with the oldest Python version the current NumPy supports" (that parses terribly).

That would make things simpler (I think), because you don't have to worry that a new minor release of SciPy will accidentally drop support for an old version because you compile against a newer NumPy version (which should be fine).

@seberg

seberg commented Apr 28, 2023

Copy link
Copy Markdown
Member Author

@rossbar maybe you can have a look (or someone else interested in the topic)? I think this is largely OK as it is, so might be nice to just merge soon and propose it to the mailing list for feedback/discussion.

@charris

charris commented May 24, 2023

Copy link
Copy Markdown
Member

Thanks Sebastian. If we want to change this to accepted, make another PR.

@seberg
seberg deleted the c-api-nep branch May 24, 2023 20:57
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.

4 participants