baldurk / renderdoc

RenderDoc is a stand-alone graphics debugging tool.
https://renderdoc.org
MIT License
8.88k stars 1.33k forks source link

Remove some deprecated and internal Python C API usages #3287

Closed kb-1000 closed 5 months ago

kb-1000 commented 6 months ago

Description

This removes some usages of deprecated and internal Python C APIs (including those that were removed in Python 3.13).

Unfortunately, some of the replacement APIs were added in (already EOL) versions of Python that are still newer than the version you use, so some preprocessor #ifs had to be used. (I'd recommend updating it if possible so these can be removed, I might be able to look into that at some point) Additionally, I added pythoncapi-compat, which is an official header-only library that enables use of some newer APIs on older Python versions, which among others handles the PyFrame_Get* functions for you. But I can remove that part if you want.