Even though Samba seems to already have updated to support Python 3.12, those two packages are configured to only build with Python up to 3.11. This keeps net-fs/samba from supporting 3.12.
Also see bug 920516