Document the current practice for SystemError
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 36k
- PR merge metrics
- PR metrics pending
Description
@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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the SystemError section at docs.python.org/3/library/exceptions.html#SystemError and review the issue's description of improper C API use. Update the documentation to reflect the stated current practice, including detectable misuse in extensions, and ensure the resulting text no longer implies that CPython internal errors are the only source.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100