diff --git a/setup.py b/setup.py index eeb5832..c9177e3 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ from setuptools import setup from setuptools import find_packages __author__ = 'Ryan McGrath ' -__version__ = '2.4.0' +__version__ = '2.5.0' setup( # Basic package information. @@ -16,7 +16,7 @@ setup( include_package_data=True, # Package dependencies. - install_requires=['simplejson', 'requests>=0.14.1'], + install_requires=['simplejson', 'requests>=0.14.0'], # Metadata for PyPI. author='Ryan McGrath', diff --git a/twython/twython.py b/twython/twython.py index 535ecec..0417b2b 100644 --- a/twython/twython.py +++ b/twython/twython.py @@ -9,7 +9,7 @@ """ __author__ = "Ryan McGrath " -__version__ = "2.4.0" +__version__ = "2.5.0" import urllib import re @@ -165,6 +165,11 @@ class Twython(object): raise TwythonError('Method must be of GET or POST') params = params or {} + # requests doesn't like items that can't be converted to unicode, + # so let's be nice and do that for the user + for k, v in params.items(): + if isinstance(v, (int, bool)): + params[k] = u'%s' % v func = getattr(self.client, method) if method == 'get':