add deprecated_warn_for/error_for methods.
Merge branch 'master' into deprecated-for-method
Merge pull request #2 from axsh/deprecated-for-method

add deprecated_warn_for/error_for methods.