diff options
| author | Sean Reifschneider <jafo00@gmail.com> | 2016-12-17 07:50:40 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-12-17 07:50:40 -0700 |
| commit | e741b2a2396895a0ab5e2b0da253485c0be0f8bc (patch) | |
| tree | 0d02df55c8abf0b2882585d1006dc1e817518be7 | |
| parent | d6a7a49ff105acb534f2bfb308ed31134b76423f (diff) | |
| parent | f34f9d233cb16615ff40703d27dfd945663e2358 (diff) | |
| download | python-memcached-e741b2a2396895a0ab5e2b0da253485c0be0f8bc.tar.gz | |
Merge pull request #111 from timgraham/has_unicode
Remove unused _has_unicode/_str_cls vars
| -rw-r--r-- | memcache.py | 11 | ||||
| -rw-r--r-- | tests/test_memcache.py | 11 |
2 files changed, 0 insertions, 22 deletions
diff --git a/memcache.py b/memcache.py index 69c4973..4fb9b8c 100644 --- a/memcache.py +++ b/memcache.py @@ -76,17 +76,6 @@ def useOldServerHashFunction(): serverHashFunction = binascii.crc32 from io import BytesIO -if six.PY2: - try: - unicode - except NameError: - _has_unicode = False - else: - _has_unicode = True -else: - _has_unicode = True - -_str_cls = six.string_types valid_key_chars_re = re.compile(b'[\x21-\x7e\x80-\xff]+$') diff --git a/tests/test_memcache.py b/tests/test_memcache.py index 321dc7b..7c34189 100644 --- a/tests/test_memcache.py +++ b/tests/test_memcache.py @@ -6,17 +6,6 @@ import six from memcache import Client, SERVER_MAX_KEY_LENGTH, SERVER_MAX_VALUE_LENGTH -try: - _str_cls = basestring -except NameError: - _str_cls = str - - -def to_s(val): - if not isinstance(val, _str_cls): - return "%s (%s)" % (val, type(val)) - return "%s" % val - class FooStruct(object): |
