From 22a215fb6a0e8f0b4479c994f3d88e65bff3dda1 Mon Sep 17 00:00:00 2001 From: 6ug Date: Fri, 19 Oct 2018 13:10:57 +0530 Subject: [PATCH] Removed web3._utils.six support --- web3/_utils/caching.py | 7 ++----- web3/_utils/six/__init__.py | 5 ----- web3/_utils/six/six.py | 7 ------- web3/utils/__init__.py | 1 - 4 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 web3/_utils/six/__init__.py delete mode 100644 web3/_utils/six/six.py diff --git a/web3/_utils/caching.py b/web3/_utils/caching.py index 3660571f86..5078bb0856 100644 --- a/web3/_utils/caching.py +++ b/web3/_utils/caching.py @@ -1,3 +1,4 @@ +import collections import hashlib from eth_utils import ( @@ -11,10 +12,6 @@ to_bytes, ) -from .six import ( - Generator, -) - def generate_cache_key(value): """ @@ -32,7 +29,7 @@ def generate_cache_key(value): for key in sorted(value.keys()) )) - elif is_list_like(value) or isinstance(value, Generator): + elif is_list_like(value) or isinstance(value, collections.Generator): return generate_cache_key("".join(( generate_cache_key(item) for item diff --git a/web3/_utils/six/__init__.py b/web3/_utils/six/__init__.py deleted file mode 100644 index 6855eb18eb..0000000000 --- a/web3/_utils/six/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -from .six import ( # noqa: #401 - urlparse, - urlunparse, - Generator, -) diff --git a/web3/_utils/six/six.py b/web3/_utils/six/six.py deleted file mode 100644 index 86a49e3bf8..0000000000 --- a/web3/_utils/six/six.py +++ /dev/null @@ -1,7 +0,0 @@ -import collections -from urllib.parse import ( # noqa: F401 - urlparse, - urlunparse, -) - -Generator = collections.Generator diff --git a/web3/utils/__init__.py b/web3/utils/__init__.py index bee0cbea8d..7cc7756092 100644 --- a/web3/utils/__init__.py +++ b/web3/utils/__init__.py @@ -20,7 +20,6 @@ normalizers, request, rpc_abi, - six, threads, toolz, transactions,