KApiDox breaks with Python 3.12
PyYAML==6.0 is broken in Python 3.12, so we need to update the PyYAML dependency. Using PyYAML~=6.0 or PyYAML==6.0.1 fixes this.
But it causes another error, this time in KApiDox, because KApiDox is using distutils (in https://invent.kde.org/frameworks/kapidox/-/blob/master/kapidox/generator.py) which was deprecated in Python 3.10 and removed from Python 3.12.
For whoever needs a workaround: use distrobox to install a distribution with a lower Python version, then run kapidox from it.