Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Document the current practice for SystemError #95799

Open
@serhiy-storchaka

Description

@serhiy-storchaka

@malemburg pointed that the documentation of SystemError only refers to CPython internal errors as the source.

https://docs.python.org/3/library/exceptions.html#SystemError

On practice, SystemError is also raised on improper use of the C API (like NULL pointer, or negative size, or wrong type in the concrete API) if it is possible to detect such error and it is not too costly (macros usually lack any argument checks). An alternative to SystemError is a crash or memory corruption. Currently the main source of SystemError is errors in third-party extensions, not in the Python core or standard extensions.

The documentation looks outdated, perhaps it predates the public C API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.10only security fixes3.11only security fixes3.12only security fixesdocsDocumentation in the Doc dirtopic-C-API

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions