This patch is based on the one posted by Mario Lobo in bug 244212.
I have tested patches and regenerated them, two patches were also generating warnings which I cleaned up.
This also migrates the port to python3. Tested on my machine and it works, but further testing is required, especially by people using the python interface.
Since 5.2.44 is fixing some vulnerabilities, patch includes new entry in vuxml.
Please if I'm mistaken regarding vulnerabilities please point me in the right direction.