Closed
Description
Feature or enhancement
Proposal:
The PySys_GetObject()
function has two flaws:
- It clears any error raised inside the function, including important and critical errors.
- It returns a borrowed reference.
We need to add a replacement free from these flaws. Any ideas about the API and the name?
Links to previous discussion of this feature:
- Avoid suppressing all exceptions in PyObject_HasAttr() #75753
- C API: Report ignored exception in C API functions which ignore all errors #106672