renderdoc fails to build with Python 3.13.0a3. /builddir/build/BUILD/renderdoc-1.31/redhat-linux-build/qrenderdoc/renderdoc_python.cxx: In function ‘PyObject* RENDERDOC_DumpObject(PyObject*)’: /builddir/build/BUILD/renderdoc-1.31/redhat-linux-build/qrenderdoc/renderdoc_python.cxx:284466:43: error: ‘_PyNone_Type’ was not declared in this scope; did you mean ‘PyLong_Type’? 284466 | PyObject_IsInstance(obj, (PyObject*)&_PyNone_Type) || | ^~~~~~~~~~~~ | PyLong_Type renderdoc_python.cxx: In function ‘PyObject* RENDERDOC_DumpObject(PyObject*)’: renderdoc_python.cxx:284466:43: error: ‘_PyNone_Type’ was not declared in this scope; did you mean ‘PyLong_Type’? 284466 | PyObject_IsInstance(obj, (PyObject*)&_PyNone_Type) || | ^~~~~~~~~~~~ | PyLong_Type https://docs.python.org/3.13/whatsnew/3.13.html For the build logs, see: https://copr-be.cloud.fedoraproject.org/results/@python/python3.13/fedora-rawhide-x86_64/07015467-renderdoc/ For all our attempts to build renderdoc with Python 3.13, see: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/package/renderdoc/ Testing and mass rebuild of packages is happening in copr. You can follow these instructions to test locally in mock if your package builds with Python 3.13: https://copr.fedorainfracloud.org/coprs/g/python/python3.13/ Let us know here if you have any questions. Python 3.13 is planned to be included in Fedora 41. To make that update smoother, we're building Fedora packages with all pre-releases of Python 3.13. A build failure prevents us from testing all dependent packages (transitive [Build]Requires), so if this package is required a lot, it's important for us to get it fixed soon. We'd appreciate help from the people who know this package best, but if you don't want to work on this now, let us know so we can try to work around it on our side.
https://docs.python.org/3.13/c-api/none.html says: Note that the PyTypeObject for None is not directly exposed in the Python/C API. Since None is a singleton, testing for object identity (using == in C) is sufficient. Hence this check: PyObject_IsInstance(obj, (PyObject*)&_PyNone_Type) Should probably be replaced with: obj == Py_None
I'm looking into this, and after patching that I can see some additional errors: compiling ../../qrenderdoc/Code/pyrenderdoc/PythonContext.cpp ../../qrenderdoc/Code/pyrenderdoc/PythonContext.cpp: In static member function ‘static void PythonContext::GlobalInit()’: ../../qrenderdoc/Code/pyrenderdoc/PythonContext.cpp:274:3: error: ‘Py_SetProgramName’ was not declared in this scope; did you mean ‘Py_GetProgramName’? 274 | Py_SetProgramName(program_name); | ^~~~~~~~~~~~~~~~~ | Py_GetProgramName ../../qrenderdoc/Code/pyrenderdoc/PythonContext.cpp:280:3: error: ‘PyEval_InitThreads’ was not declared in this scope; did you mean ‘PyEval_SaveThread’? 280 | PyEval_InitThreads(); | ^~~~~~~~~~~~~~~~~~ | PyEval_SaveThread This would require switching from Py_Initialize to Py_InitializeFromConfig, which was introduced in Python 3.8 while upstream still supports and uses Python 3.6. I'm not sure yet if that's all issues, but I think so.
Seeing https://copr.fedorainfracloud.org/coprs/g/python/python3.13/build/7232827/, this is fixed now.