Skip to content

audit: add Py_TYPE to allowed symbols list #138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion abi3audit/_audit.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@
# Since they are not listed in CPython's `stable_abi.toml`, we maintain them here separately.
# For more information, see https://github.com/pypa/abi3audit/issues/85
# and https://github.com/wjakob/nanobind/discussions/500 .
_ALLOWED_SYMBOLS: set[str] = {"Py_XDECREF"}
_ALLOWED_SYMBOLS: set[str] = {
"Py_XDECREF", # not stable ABI, but defined as static inline in limited API
"Py_TYPE", # static inline before 3.14, stable ABI since 3.14
"Py_REFCNT", # macro before 3.11, static inline before 3.14, stable ABI since 3.14
}


class AuditError(Exception):
Expand Down