Skip to content

[atheris] Add FuzzedDataProvider and re-export the public API from atheris - #16610

Open
Culaii wants to merge 1 commit into
python:mainfrom
Culaii:atheris-fuzzed-data-provider
Open

Culaii wants to merge 1 commit into
python:mainfrom
Culaii:atheris-fuzzed-data-provider

Conversation

@Culaii

@Culaii Culaii commented Oct 24, 2026

Copy link
Copy Markdown

atheris.FuzzedDataProvider was missing, and atheris.instrument_imports / instrument_func /
instrument_all / enabled_hooks were not re-exported from atheris/__init__.pyi, so all of
them were reported as missing attributes (cf. google/atheris#110).

This adds atheris/native.pyi (where FuzzedDataProvider, Setup, Fuzz, Mutate and
ALL_REMAINING live at runtime) and re-exports the public names from atheris.

Notes:

  • pybind11 signatures can't be introspected by stubtest, so the annotations follow the bindings
    and the C++ declarations; unnamed pybind11 arguments are positional-only (ConsumeUnicode is
    the only one bound with py::arg("count")).
  • PickValueInList takes list[_T]: the binding is py::list, and tuples are rejected at runtime.
  • Setup/Mutate become positional-only, matching the runtime (keyword calls raise TypeError).
  • The metaclass of FuzzedDataProvider is pybind11_builtins.pybind11_type; allowlisted as for
    hnswlib.Index.

Upstream: bindings,
declarations,
docs.

Prepared with Claude Code (Claude Opus 5.5).

🤖 Generated with Claude Code

Add `atheris/native.pyi` (where `FuzzedDataProvider`, `Setup`, `Fuzz`, `Mutate` and
`ALL_REMAINING` live at runtime) and re-export the public names from `atheris/__init__.pyi`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant