" Does the candidate running have to be of the same gender"
As Mandi points out the answer is clearly yes for feminists and for the Liberals - witness Trudeau picking his cabinet on gender lines and moves by the government to require research funding be given out according to gender representation in applications.
As for the same ethnicity, well that seems to be something the left is promoting too as with the Liberals self proclaimed desire to make their latest round of judicial appointments mirror the both the ethnic and gender makeup of the country..