Use DeprecationWarning for deprecation warnings

Previously we were using ``UserWarning``. Fixes #774.
Merge pull request #777 from jairideout/issue-774

Use DeprecationWarning for deprecation warnings