diff --git a/pillarsdk/utils.py b/pillarsdk/utils.py index d7d36a9..888f1a5 100644 --- a/pillarsdk/utils.py +++ b/pillarsdk/utils.py @@ -1,6 +1,6 @@ import json import re -import six +import sys from datetime import datetime try: @@ -8,6 +8,13 @@ try: except ImportError: from urllib import urlencode +# from six: +PY3 = sys.version_info[0] == 3 +if PY3: + text_type = str +else: + text_type = unicode + def join_url(url, *paths): """ @@ -38,7 +45,7 @@ def join_url_params(url, params): def convert_to_string(param): if isinstance(param, dict): return json.dumps(param) - if isinstance(param, six.text_type): + if isinstance(param, text_type): return param.encode('utf-8') return param diff --git a/requirements.txt b/requirements.txt index 13d80f1..a22f1ed 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,5 @@ pyOpenSSL==0.15.1 requests==2.9.1 -six==1.10.0 tox>=2.3.1 wheel>=0.29.0 diff --git a/setup.py b/setup.py index 3de5c26..225df33 100644 --- a/setup.py +++ b/setup.py @@ -16,7 +16,7 @@ setup( license='BSD License', description='The Pillar REST SDK provides Python APIs to communicate to the Pillar webservices.', long_description=long_description, - install_requires=['requests>=1.0.0', 'six>=1.0.0', 'pyopenssl>=0.14'], + install_requires=['requests>=1.0.0', 'pyopenssl>=0.14'], test_requires=['tox', 'coverage', 'pytest', 'pytest-xdist', 'pytest-cov'], classifiers=[ 'Intended Audience :: Developers',