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.
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.