you cannot remove a param like that. It might break peoples code. You need a deprecation warning and class_weight will be removed in 2 releases.