scripting: remove support for Python < 3
It was sort of required already in previous commits, so remove a code branch that is not needed anymore.
Followup of commit 1fdeff25f5f113f4567ab100da9df3f0f24c3ce8.