Re #6630. Moving to new python api.