NumPy public API surface and accidental exposure of private names
0 reputation · 08 Aug 2021, 09:47 UTC
NumPy documents a public API inventory and treats names starting with underscore and modules under numpy.core as private implementation details that may change without deprecation.
The top-level package does not define a complete __all__, so from numpy import * can surface internal names and increase accidental public access. The project maintains a public API list but has an unresolved design decision about how strictly to deprecate names that became de facto public even though they were never intended as stable, as illustrated by removals in NumPy 2.0.
The goal is to clarify the intended boundary between public and private symbols and the policy for historically exposed names.
What is the current definition of NumPy's supported public API surface versus private internals? How does the incomplete __all__ affect star import behavior for accidental public access? What decision criteria govern deprecation of names that are de facto public but not intended as stable?