fix deprecation warnings
Merge pull request #247 from twitter/deprecations

fix deprecation warnings