pyobjc
pyobjc copied to clipboard
Investigate tooling to check CPython API use
CPython API misuse can be hard to diagnose, especially reference counting. problems and forgetting to clear errors.
Investigate using (custom?) tooling to automate checking:
- Using annotations to document expected reference count behaviour, with tooling to verify this (compare how clang's static analyzer does this for ObjC retain counts)
- Use annotations to mark which functions can return with an active exception and use tooling to check error propagation/clearing.
With some luck someone has written tooling for this, otherwise the most complete fix is likely a plugin for the clang static analyzer (which is a lot of work...)