Message 367570 - Python tracker

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Content
I recently added PyThreadState_GetFrame() and PyFrame_GetCode() functions to the C API of Python 3.9.

Currently, these functions return borrowed references.

I asked on capi-sig and Brett confirms that borrowed refrences should be avoided:
https://mail.python.org/archives/list/capi-sig@python.org/thread/LHESBBB3IYTXMBUKQ3WZI5CWB4WUH5YZ/

Borrowed references should be avoidedd!
https://github.com/vstinner/misc/blob/master/cpython/pep-opaque-c-api.rst#borrowed-references

I will work on a PR to modify these functions to return a strong reference instead.