Backport upstream fix for run time errors with python3.12
dfsg1-5
fixed FTBS with Python 3.12 #1074442 but IMHO there's a bit more to do
Upstream merged pull request 13337 : fix run time errors with python3.12
(like failing on opening SVG file).
But PR is still was labelled as Backport todo
.
Cherry-picking is a bit tricky — I can help with this MR proposal — as there has been some renames on main.