[Bug 1215851] New: code generated by swig < 4.0.0 is incompatible with Python 3.12