#711·py-spy

Support free-threaded python 3.13+

Author: benfredCreated Oct 23, 2024Updated Jul 4, 2026

Python 3.13 adds the ability to have a free-threaded python interpreter - which doesn't have a GIL.

py-spy doesn't currently work against free-threaded python interpreters, because:

  • PyObject layout is different : instead of just containing a ob_refcnt and ob_type members - with Py_GIL_DISABLED interpreters the PyObject has additional members (threadid/mutex/ etc)
  • MANAGED_DICT_OFFSET is different