According to the list of changes in Python 3.11:
https://docs.python.org/3.11/whatsnew/3.11.html
types defined with the Py_TPFLAGS_HAVE_GC flag set but with no
traverse function (PyTypeObject.tp_traverse) will cause an error.