CPython is phasing out using ob_type directly in favor of Py_TYPE, which is currently a macro but will afaik eventually become a function. Structs with ob_type will become opaque. See https://bugs.python.org/issue39573, python/cpython#21433 and PEP 620 for more details . pyo3 doesn't use ob_type in too many places: https://github.com/PyO3/pyo3/search?q=ob_type&unscoped_q=ob_type.
CPython is phasing out using
ob_typedirectly in favor ofPy_TYPE, which is currently a macro but will afaik eventually become a function. Structs withob_typewill become opaque. See https://bugs.python.org/issue39573, python/cpython#21433 and PEP 620 for more details . pyo3 doesn't useob_typein too many places: https://github.com/PyO3/pyo3/search?q=ob_type&unscoped_q=ob_type.