Skip to content

DEP: remove NonNULL attributes from the API interfaces #20971

@mattip

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?

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