According to wiki: https://wiki.samba.org/index.php/Samba_4.19_Features_added/changed Changes since 4.19.2 fixed: BUG 15513: Samba doesn't build with Python 3.12. https://bugzilla.samba.org/show_bug.cgi?id=15513 Thank you.
Reverse dependencies missing python3_12 targets such as: sys-libs/ldb sys-libs/talloc sys-libs/tdb sys-libs/tevent All are a part of Samba.