From 48f2caf12c0df4f33a79d5562d6db0647017fe9b Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 1 Nov 2015 08:15:17 -0800 Subject: [PATCH] Apply Python 3 futurize transform libmodernize.fixes.fix_unicode_type. --- zulip/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zulip/__init__.py b/zulip/__init__.py index 40bbc86..f87117c 100644 --- a/zulip/__init__.py +++ b/zulip/__init__.py @@ -21,6 +21,7 @@ # THE SOFTWARE. from __future__ import print_function +from __future__ import absolute_import import simplejson import requests import time @@ -36,6 +37,7 @@ from distutils.version import LooseVersion from six.moves.configparser import SafeConfigParser import logging +import six __version__ = "0.2.4" @@ -244,7 +246,7 @@ class Client(object): request = {} for (key, val) in orig_request.iteritems(): - if not (isinstance(val, str) or isinstance(val, unicode)): + if not (isinstance(val, str) or isinstance(val, six.text_type)): request[key] = simplejson.dumps(val) else: request[key] = val