function,PyFloat_GetMax,3.2,
function,PyFloat_GetMin,3.2,
var,PyFloat_Type,3.2,
+type,PyFrameObject,3.2,
function,PyFrame_GetCode,3.10,
function,PyFrame_GetLineNumber,3.10,
function,PyFrozenSet_New,3.2,
type,Py_intptr_t,3.2,
type,Py_ssize_t,3.2,
type,Py_uintptr_t,3.2,
-type,_frame,3.2,
-type,_node,3.2,
type,allocfunc,3.2,
type,binaryfunc,3.2,
type,descrgetfunc,3.2,
)
return stable_data | stable_exported_data | stable_functions
+def check_private_names(manifest):
+ """Ensure limited API doesn't contain private names
+
+ Names prefixed by an underscore are private by definition.
+ """
+ for name, item in manifest.contents.items():
+ if name.startswith('_') and not item.abi_only:
+ raise ValueError(
+ f'`{name}` is private (underscore-prefixed) and should be '
+ + 'removed from the stable ABI list or or marked `abi_only`')
def main():
parser = argparse.ArgumentParser(
with args.file.open() as file:
manifest = parse_manifest(file)
+ check_private_names(manifest)
+
# Remember results of all actions (as booleans).
# At the end we'll check that at least one action was run,
# and also fail if any are false.