https://src.fedoraproject.org/rpms/python-pyqt6/blob/rawhide/f/py315.patch --- a/qpy/QtCore/qpycore_pyqtslot.cpp +++ b/qpy/QtCore/qpycore_pyqtslot.cpp @@ -24,6 +24,13 @@ #include "qpycore_pyqtslot.h" +// PyWeakref_GetObject was removed from headers in Python 3.15 but is still +// part of the stable ABI. Declare it here for Python 3.15+ compatibility. +#if PY_VERSION_HEX >= 0x030f0000 +extern "C" PyObject* PyWeakref_GetObject(PyObject *ref); +#endif + + // Create the slot for a callable. PyQtSlot::PyQtSlot(PyObject *callable, bool callable_is_method, const Chimera::Signature *slot_signature)