Finish second merge of @michaelhelmick's Twython patches
This commit is contained in:
commit
32d29fb007
2 changed files with 8 additions and 3 deletions
4
setup.py
4
setup.py
|
|
@ -4,7 +4,7 @@ from setuptools import setup
|
|||
from setuptools import find_packages
|
||||
|
||||
__author__ = 'Ryan McGrath <ryan@venodesigns.net>'
|
||||
__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',
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
"""
|
||||
|
||||
__author__ = "Ryan McGrath <ryan@venodesigns.net>"
|
||||
__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':
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue