hds: python3 support