Skip to content

DEP: remove NonNULL attributes from the API interfaces #20971

Description

@mattip

We use NonNull in the interface API like here

'PyArray_NewFromDescr': (94, StealRef(2), NonNull([1, 2])),

I think this is an anti-pattern since

  • These are interface functions. It is on us to actively check NULL input, not to politely suggest that input cannot be NULL.
  • The compiler directives generated are only suggestions, and we know how often users relate to warnings
  • Some compilers and interface mechanisms have no idea that these hints are there. For instance, these functions are exported from the shared object and can be called by CTypes. How will the compiler hint help?

Activity

  1. seberg commented on Jun 21, 2023

    @seberg
    Member

    This (and the marker functionality) is currently removed, so closing.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions