Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

DOC: Document abi3 compat #27981

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

Merged
merged 3 commits into from
Dec 11, 2024
Merged

DOC: Document abi3 compat #27981

merged 3 commits into from
Dec 11, 2024

Conversation

larsoner
Copy link
Contributor

Closes #27979

Chose to link to the CPython docs and cibuildwheel -- the former is the authoritative source and the latter has some nice practical links. Another option would be this setuptools page but I'm not sure it would add much. Happy to tweak as desired!

@ngoldbaum
Copy link
Member

Thanks! Can you also mention @seberg's caveat about using functions that expose or depend on CPython internals not exposed by the limited API isn't supported. AFAIK, for 99% of uses this doesn't matter, but it's worth mentioning there are possible caveats and our testing is definitely not exhaustive. See #27979 (comment).

@ngoldbaum
Copy link
Member

Doc build fails with:

/home/circleci/repo/doc/source/dev/depending_on_numpy.rst:36: WARNING: undefined label: "cpython's ``abi3`"

You can build the docs locally with spin docs, assuming you have e.g. sphinx installed.

@seberg
Copy link
Member

seberg commented Dec 11, 2024

Since the stable API is about headers really, I am not really worried about there being caveats we are missing by only including headers as a test (unless Python changes their headers again).

The existing caveats are really very narrow: The internals from our scalar types is the only thing I know right now.

@seberg
Copy link
Member

seberg commented Dec 11, 2024

It may make sense to point out that you need to use NumPy 2+ (the issue with the object cast was fixed 2.0.1 so that seems irrelevant in practice).

@larsoner
Copy link
Contributor Author

I reworded a bit to point out that this is supported on 2.0+. I tried a few times to word something about the potential caveats but couldn't get it right. Feel free to push directly a change / addition if you want @seberg !

@seberg
Copy link
Member

seberg commented Dec 11, 2024

Nah, I think it's fine to not mention the caveats. They are extremely niche about direct access to a few scalars that happen to subclass from Python.

@ngoldbaum
Copy link
Member

Thanks @larsoner!

@ngoldbaum ngoldbaum merged commit c81c44a into numpy:main Dec 11, 2024
66 checks passed
@larsoner larsoner deleted the abi3 branch December 11, 2024 20:10
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.

DOC: Explicitly spell out abi3 (in)compatibility
3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.