From 468972ff27318a00d4e28c9e22d00a07d54de50b Mon Sep 17 00:00:00 2001 From: Michael McCarthy Date: Fri, 1 Jun 2018 14:20:45 -0500 Subject: [PATCH 1/2] Fix urlparse import in auth.py --- contrib/clients/python/lens/client/auth.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/contrib/clients/python/lens/client/auth.py b/contrib/clients/python/lens/client/auth.py index fccc75c95..c4b96e782 100644 --- a/contrib/clients/python/lens/client/auth.py +++ b/contrib/clients/python/lens/client/auth.py @@ -18,7 +18,10 @@ from requests.auth import AuthBase import subprocess import threading -from urlparse import urlparse +try: + from urllib.parse import urlparse +except ImportError: + from urlparse import urlparse class SpnegoAuth(AuthBase): From fa04c6d2146e737f6c9881fea84f8553ef792d62 Mon Sep 17 00:00:00 2001 From: Michael McCarthy Date: Sun, 3 Jun 2018 09:16:42 -0500 Subject: [PATCH 2/2] Less hacky way of dealing with Python2 / 3 compatibility --- contrib/clients/python/lens/client/auth.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/contrib/clients/python/lens/client/auth.py b/contrib/clients/python/lens/client/auth.py index c4b96e782..51195f42b 100644 --- a/contrib/clients/python/lens/client/auth.py +++ b/contrib/clients/python/lens/client/auth.py @@ -14,14 +14,14 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from future.standard_library import install_aliases +install_aliases() + import kerberos from requests.auth import AuthBase import subprocess import threading -try: - from urllib.parse import urlparse -except ImportError: - from urlparse import urlparse +from urllib.parse import urlparse class SpnegoAuth(AuthBase):