Currently some require msg and some message. Would be nice to go for one and deprecate the other.
Yep; i agree.
Problem is that it will break existing schemas.
@Pylons/deform-colander-developers @mcdonc your word ?
To the extent this bothers somebody, I'd make Function accept both "message" and "msg" and prefer "msg" but fall back to "message" in its constructor, I guess. If "message" is passed, issue a deprecation warning. e.g.:
def __init__(function, msg=None, message=None):
self.function = function
if msg is None and message is None:
msg = _('Invalid value')
elif message is not None:
# print deprecation warning
msg = message
self.message = msg
This was fixed in #31, but did not provide the fallback or deprecation notice.
add `message` back to `Function` and emit warning
Raise an error if both msg and message are passed in. refs #64