After transition python2 -> python3 a crash is experienced when closing kig in case an object is create via python scripting.
But I am not sure about the comment, i.e., whether the Kig maintainer(s) want this kind of verbose documentation in the code (as opposed to in the commit history only) or not. (I guess it mostly depends on how likely somebody is to accidentally change it back if the comment is missing.)
I saw now that Py_FinalizeEx() exists only since python version 3.6.
But yes, it's probably best to just switch back to Py_Finalize(), I suppose. The return value is not checked anyway.