After T4669 added support for range validation to the OCaml validator there is no need to keep the slow Python validator in place.
Raplce all occurances of <validator name="range" argument="--min=1 --max=65535"/> with <validator name="numeric" argument="--range 1-65535"/>