add a deprecate decorator

Uses warnings module to warn about deprecated functions/methods.