Skip to content

DOC: Add documentation about how to use NumPy with the Python limited API #31259

Open

Description

@ngoldbaum

Issue with current documentation:

As part of #30704, we're adding support for the new abi3t ABI over in #31091. While working on that, we noticed that the narrative docs only mention the limited API in passing or in release notes.

Idea or request for content:

The docs should have a section on how to build extensions using the numpy C API and the Python limited API. It should eventually describe both abi3 and abi3t builds, although for now abi3 is all that's supported.

It could probably go in this section, along with the other build examples.

It may also make sense to talk about the limited API in the reference C API docs, to describe how some types and structures are either not exposed or have slightly different layouts in the Python stable ABI.

Activity

  1. Vishwaspatel2401 commented on Apr 16, 2026

    @Vishwaspatel2401
  2. added a commit that references this issue on Apr 17, 2026
    2f4cd07
  3. ngoldbaum commented on Apr 21, 2026

    @ngoldbaum
    MemberAuthor

    Hi all, just a note that I'm planning to add these docs eventually. I don't mind someone else trying in the meantime, but please don't use an AI model to generate these docs unless you understand the output of the AI model and can spot when it makes mistakes.

  4. manish-9245 commented on Oct 14, 2026

    @manish-9245

    Hi, per @ngoldbaum note that help is welcome here — I would like to add the limited API docs section for abi3/abi3t usage. Small docs PR. Thanks!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    04 - Documentation39 - free-threadingPRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions