This package does not support Python 3.12. Please test it with Python 3.12 as a matter of urgency as the default will change in early June, as per message on gentoo-dev: https://www.mail-archive.com/gentoo-dev@lists.gentoo.org/msg99104.html. Please check the information provided in the tracker. Ask in #gentoo-python on IRC if need any help.
Kodi 21 supports Python 3.12 now. https://gitweb.gentoo.org/repo/gentoo.git/commit/media-tv/kodi?id=0644400fbcac4a9e297cbfab95bfc4fb2edb028e