Blame SOURCES/aliyuncli-python3-fixes.patch

b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsExportHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsExportHandler.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsExportHandler.py	2019-02-19 12:08:17.331785393 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsExportHandler.py	2019-02-19 14:40:39.656330971 +0100
b94b9d
@@ -13,7 +13,7 @@
b94b9d
     
b94b9d
     def getFileName(self,keyValues):
b94b9d
         filename = None
b94b9d
-        if keyValues.has_key('--filename') and len(keyValues['--filename']) > 0:
b94b9d
+        if '--filename' in keyValues and len(keyValues['--filename']) > 0:
b94b9d
             filename = keyValues['--filename'][0]
b94b9d
         else:
b94b9d
             return filename, "A file name is needed! please use \'--filename\' and add the file name."
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsImportHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsImportHandler.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsImportHandler.py	2019-02-19 12:08:17.331785393 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/ecsImportHandler.py	2019-02-19 14:41:48.927128430 +0100
b94b9d
@@ -13,7 +13,7 @@
b94b9d
     
b94b9d
     def getFileName(self,keyValues):
b94b9d
         filename = None
b94b9d
-        if keyValues.has_key('--filename') and len(keyValues['--filename']) > 0:
b94b9d
+        if '--filename' in keyValues and len(keyValues['--filename']) > 0:
b94b9d
             filename = keyValues['--filename'][0]
b94b9d
         else:
b94b9d
             print("A profile is needed! please use \'--filename\' and add the profile name.")
b94b9d
@@ -21,7 +21,7 @@
b94b9d
 
b94b9d
     def getInstanceCount(self,keyValues):
b94b9d
         count = 1
b94b9d
-        if keyValues.has_key('--instancecount') and len(keyValues['--instancecount']) > 0:
b94b9d
+        if '--instancecount' in keyValues and len(keyValues['--instancecount']) > 0:
b94b9d
             if  keyValues['--instancecount'][0].isdigit() and int(keyValues['--instancecount'][0]) >= 0:
b94b9d
                 count = keyValues['--instancecount'][0]
b94b9d
             else:
b94b9d
@@ -113,7 +113,7 @@
b94b9d
 
b94b9d
     def isAllocatePublicIpAddress(self,keyValues):
b94b9d
         _publicIp = False
b94b9d
-        if keyValues.has_key('--allocatepublicip') and len(keyValues['--allocatepublicip']) > 0:
b94b9d
+        if '--allocatepublicip' in keyValues and len(keyValues['--allocatepublicip']) > 0:
b94b9d
             if  keyValues['--allocatepublicip'][0] == "yes":
b94b9d
                 _publicIp = True
b94b9d
         return _publicIp
b94b9d
@@ -125,7 +125,7 @@
b94b9d
             '''
b94b9d
             data = json.loads(jsonbody)
b94b9d
             '''
b94b9d
-            if data.has_key('InstanceId') and len(data['InstanceId']) > 0:
b94b9d
+            if 'InstanceId' in data and len(data['InstanceId']) > 0:
b94b9d
                 instanceId = data['InstanceId']
b94b9d
         except Exception as e:
b94b9d
             pass
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsExportHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsExportHandler.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsExportHandler.py	2019-02-19 12:08:17.331785393 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsExportHandler.py	2019-02-19 14:42:11.772731833 +0100
b94b9d
@@ -38,7 +38,7 @@
b94b9d
 
b94b9d
     def getFileName(self,keyValues):
b94b9d
         filename = None
b94b9d
-        if keyValues.has_key('--filename') and len(keyValues['--filename']) > 0:
b94b9d
+        if '--filename' in keyValues and len(keyValues['--filename']) > 0:
b94b9d
             filename = keyValues['--filename'][0]
b94b9d
         else:
b94b9d
             return filename, "A file name is needed! please use \'--filename\' and add the file name."
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsImportHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsImportHandler.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsImportHandler.py	2019-02-19 12:08:17.331785393 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/rdsImportHandler.py	2019-02-19 14:39:09.247900469 +0100
b94b9d
@@ -13,7 +13,7 @@
b94b9d
     
b94b9d
     def getFileName(self,keyValues):
b94b9d
         filename = None
b94b9d
-        if keyValues.has_key('--filename') and len(keyValues['--filename']) > 0:
b94b9d
+        if '--filename' in keyValues and len(keyValues['--filename']) > 0:
b94b9d
             filename = keyValues['--filename'][0]
b94b9d
         else:
b94b9d
             return filename, "A filename is needed! please use \'--filename\' and add the file name."
b94b9d
@@ -21,7 +21,7 @@
b94b9d
     def getInstanceCount(self,keyValues):
b94b9d
         count = 1
b94b9d
         import_count = "--count"
b94b9d
-        if keyValues.has_key(import_count) and len(keyValues[import_count]) > 0:
b94b9d
+        if import_count in keyValues and len(keyValues[import_count]) > 0:
b94b9d
             if  keyValues[import_count][0].isdigit() and int(keyValues[import_count][0]) >= 0:
b94b9d
                 count = keyValues[import_count][0]
b94b9d
             else:
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/userConfigHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/userConfigHandler.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/userConfigHandler.py	2018-01-24 04:08:33.000000000 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/userConfigHandler.py	2019-02-19 11:01:46.116653274 +0100
b94b9d
@@ -17,37 +17,37 @@
b94b9d
 
b94b9d
     def getConfigHandlerOptions(self):
b94b9d
         return [ConfigCmd.name]
b94b9d
-				
b94b9d
+
b94b9d
     def showConfig(self):
b94b9d
         _credentialsPath = os.path.join(self.extensionCliHandler.aliyunConfigurePath,self.extensionCliHandler.credentials)
b94b9d
         _configurePath = os.path.join(self.extensionCliHandler.aliyunConfigurePath,self.extensionCliHandler.configure)
b94b9d
         config = dict()
b94b9d
         configContent = dict() 
b94b9d
-	credentialsContent = dict ()
b94b9d
-	if os.path.exists(_configurePath):
b94b9d
+        credentialsContent = dict ()
b94b9d
+        if os.path.exists(_configurePath):
b94b9d
             for line in open(_configurePath):
b94b9d
                 line = line.strip('\n')
b94b9d
                 if line.find('=') > 0:
b94b9d
                     list = line.split("=",1)
b94b9d
-		    configContent[list[0]] = list[1]
b94b9d
-		else: 
b94b9d
-		    pass
b94b9d
-	config['configure'] = configContent
b94b9d
-	if os.path.exists(_credentialsPath):
b94b9d
-	    for line in open(_credentialsPath):
b94b9d
+                    configContent[list[0]] = list[1]
b94b9d
+                else: 
b94b9d
+                    pass
b94b9d
+        config['configure'] = configContent
b94b9d
+        if os.path.exists(_credentialsPath):
b94b9d
+            for line in open(_credentialsPath):
b94b9d
                 line = line.strip('\n')
b94b9d
                 if line.find('=') > 0:
b94b9d
                     list = line.split("=",1)
b94b9d
-		    credentialsContent[list[0]] = list[1]
b94b9d
-		else: 
b94b9d
-		    pass 
b94b9d
-	config ['credentials'] = credentialsContent
b94b9d
-	response.display_response("showConfigure",config,'table')
b94b9d
+                    credentialsContent[list[0]] = list[1]
b94b9d
+                else: 
b94b9d
+                    pass 
b94b9d
+        config ['credentials'] = credentialsContent
b94b9d
+        response.display_response("showConfigure",config,'table')
b94b9d
     def importConfig():
b94b9d
         pass
b94b9d
     def exportConfig():
b94b9d
         pass
b94b9d
-	
b94b9d
+
b94b9d
 
b94b9d
 
b94b9d
 if __name__ == "__main__":
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/advance/userProfileHandler.py b/bundled/aliyun/aliyun-cli/aliyuncli/advance/userProfileHandler.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/advance/userProfileHandler.py	2019-02-19 12:08:17.332785376 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/advance/userProfileHandler.py	2019-02-19 14:40:12.267806439 +0100
b94b9d
@@ -20,7 +20,7 @@
b94b9d
     def handleProfileCmd(self, cmd, keyValues):
b94b9d
         if cmd.lower() == ProfileCmd.useProfile.lower(): # confirm command is right
b94b9d
             #check --name is valid
b94b9d
-            if keyValues.has_key(ProfileCmd.name) and len(keyValues[ProfileCmd.name]) > 0:
b94b9d
+            if ProfileCmd.name in keyValues and len(keyValues[ProfileCmd.name]) > 0:
b94b9d
                 _value = keyValues[ProfileCmd.name][0] # use the first value
b94b9d
                 self.extensionCliHandler.setUserProfile(_value)
b94b9d
             else:
b94b9d
@@ -34,7 +34,7 @@
b94b9d
         newProfileName = ''
b94b9d
         if cmd.lower() == ProfileCmd.addProfile.lower(): # confirm command is right
b94b9d
             #check --name is valid
b94b9d
-            if keyValues.has_key(ProfileCmd.name) and len(keyValues[ProfileCmd.name]) > 0:
b94b9d
+            if ProfileCmd.name in keyValues and len(keyValues[ProfileCmd.name]) > 0:
b94b9d
                 _value = keyValues[ProfileCmd.name][0] # check the first value
b94b9d
                 # only input key and secret
b94b9d
                 newProfileName = _value
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliParser.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliParser.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliParser.py	2019-02-19 12:08:17.332785376 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliParser.py	2019-02-19 14:35:32.009660989 +0100
b94b9d
@@ -137,9 +137,9 @@
b94b9d
                         values.append(self.args[index])
b94b9d
                         index = index + 1
b94b9d
                     keyValues[currentValue] = values
b94b9d
-        if keyValues.has_key(keystr) and keyValues[keystr].__len__() > 0:
b94b9d
+        if keystr in keyValues and keyValues[keystr].__len__() > 0:
b94b9d
             _key = keyValues[keystr][0]
b94b9d
-        if keyValues.has_key(secretstr) and keyValues[secretstr].__len__() > 0:
b94b9d
+        if secretstr in keyValues and keyValues[secretstr].__len__() > 0:
b94b9d
             _secret = keyValues[secretstr][0]
b94b9d
         #print("accesskeyid: ", _key , "accesskeysecret: ",_secret)
b94b9d
         return _key, _secret
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyuncli.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyuncli.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyuncli.py	2018-01-24 04:08:33.000000000 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyuncli.py	2019-02-19 13:35:35.738680413 +0100
b94b9d
@@ -19,8 +19,9 @@
b94b9d
 '''
b94b9d
 
b94b9d
 import sys 
b94b9d
-reload(sys)
b94b9d
-sys.setdefaultencoding('utf-8')
b94b9d
+if sys.version_info[0] < 3:
b94b9d
+    reload(sys)
b94b9d
+    sys.setdefaultencoding('utf-8')
b94b9d
 __author__ = 'xixi.xxx'
b94b9d
 import aliyunCliMain
b94b9d
 
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliUpgrade.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliUpgrade.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliUpgrade.py	2019-02-19 12:08:17.332785376 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunCliUpgrade.py	2019-02-19 11:15:19.920089641 +0100
b94b9d
@@ -18,7 +18,7 @@
b94b9d
 '''
b94b9d
 
b94b9d
 import aliyunCliConfiugre
b94b9d
-import urllib2
b94b9d
+import urllib3
b94b9d
 import re
b94b9d
 import os
b94b9d
 import platform
b94b9d
@@ -151,7 +151,7 @@
b94b9d
 # this functino will get the latest version
b94b9d
     def _getLatestTimeFromServer(self):
b94b9d
         try:
b94b9d
-            f = urllib2.urlopen(self.configure.server_url,data=None,timeout=5)
b94b9d
+            f = urllib3.urlopen(self.configure.server_url,data=None,timeout=5)
b94b9d
             s = f.read()
b94b9d
             return s
b94b9d
         except Exception as e:
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunOpenApiData.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunOpenApiData.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunOpenApiData.py	2019-02-19 12:08:17.332785376 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunOpenApiData.py	2019-02-19 14:37:28.221649497 +0100
b94b9d
@@ -26,7 +26,7 @@
b94b9d
 import aliyunSdkConfigure
b94b9d
 import json
b94b9d
 import cliError
b94b9d
-import urllib2
b94b9d
+import urllib3
b94b9d
 import handleEndPoint
b94b9d
 
b94b9d
 from __init__ import  __version__
b94b9d
@@ -259,7 +259,7 @@
b94b9d
     def changeEndPoint(self, classname, keyValues):
b94b9d
         endpoint = "Endpoint"
b94b9d
         try:
b94b9d
-            if keyValues.has_key(endpoint) and keyValues[endpoint].__len__() > 0:
b94b9d
+            if endpoint in keyValues and keyValues[endpoint].__len__() > 0:
b94b9d
                 classname._RestApi__domain = keyValues[endpoint][0]
b94b9d
         except Exception as e:
b94b9d
             pass
b94b9d
@@ -444,10 +444,10 @@
b94b9d
 
b94b9d
     def getTempVersion(self,keyValues):
b94b9d
         key='--version'
b94b9d
-        if keyValues is not None and keyValues.has_key(key):
b94b9d
+        if keyValues is not None and key in keyValues:
b94b9d
             return keyValues.get(key)
b94b9d
         key = 'version'
b94b9d
-        if keyValues is not None and keyValues.has_key(key):
b94b9d
+        if keyValues is not None and key in keyValues:
b94b9d
             return keyValues.get(key)
b94b9d
 
b94b9d
     def getVersionFromFile(self,cmd):
b94b9d
@@ -513,7 +513,7 @@
b94b9d
         self.checkForServer(response,cmd,operation)
b94b9d
     def getRequestId(self,response):
b94b9d
         try:
b94b9d
-            if response.has_key('RequestId') and len(response['RequestId']) > 0:
b94b9d
+            if 'RequestId' in response and len(response['RequestId']) > 0:
b94b9d
                 requestId = response['RequestId']
b94b9d
                 return  requestId
b94b9d
         except Exception:
b94b9d
@@ -532,7 +532,7 @@
b94b9d
             ua = ""
b94b9d
         url = configure.server_url + "?requesId=" + requestId + "&ak=" + ak +"&ua="+ua+"&cmd="+cmd+"&operation="+operation
b94b9d
         try:
b94b9d
-            f = urllib2.urlopen(url,data=None,timeout=5)
b94b9d
+            f = urllib3.urlopen(url,data=None,timeout=5)
b94b9d
             s = f.read()
b94b9d
             return s
b94b9d
         except Exception :
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunSdkConfigure.py b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunSdkConfigure.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/aliyunSdkConfigure.py	2019-02-19 12:08:17.333785359 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/aliyunSdkConfigure.py	2019-02-19 14:38:04.032029661 +0100
b94b9d
@@ -39,7 +39,7 @@
b94b9d
 
b94b9d
     def sdkConfigure(self,cmd,operation):
b94b9d
         keyValues = self.parser._getKeyValues()
b94b9d
-        if keyValues.has_key('--version') and len(keyValues['--version']) > 0:
b94b9d
+        if '--version' in keyValues and len(keyValues['--version']) > 0:
b94b9d
             version=keyValues['--version'][0]
b94b9d
             filename=self.fileName
b94b9d
             self.writeCmdVersionToFile(cmd,version,filename)
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/configure.py b/bundled/aliyun/aliyun-cli/aliyuncli/configure.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/configure.py	2019-02-19 12:08:17.333785359 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/configure.py	2019-02-19 11:12:58.670708353 +0100
b94b9d
@@ -23,6 +23,8 @@
b94b9d
 import aliyunCliParser
b94b9d
 import platform
b94b9d
 
b94b9d
+if sys.version_info[0] > 2:
b94b9d
+    raw_input = input
b94b9d
 
b94b9d
 OSS_CREDS_FILENAME = "%s/.aliyuncli/osscredentials" % os.path.expanduser('~')
b94b9d
 OSS_CONFIG_SECTION = 'OSSCredentials'
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/paramOptimize.py b/bundled/aliyun/aliyun-cli/aliyuncli/paramOptimize.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/paramOptimize.py	2019-02-19 12:08:17.333785359 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/paramOptimize.py	2019-02-19 11:14:58.926181598 +0100
b94b9d
@@ -19,7 +19,7 @@
b94b9d
 #/usr/bin/env python
b94b9d
 #!-*- coding:utf-8 -*-
b94b9d
 import os
b94b9d
-import urllib2
b94b9d
+import urllib3
b94b9d
 import cliError
b94b9d
 
b94b9d
 
b94b9d
@@ -64,9 +64,9 @@
b94b9d
         print(e)
b94b9d
 def _getParamFromUrl(prefix,value,mode):
b94b9d
 
b94b9d
-    req = urllib2.Request(value)
b94b9d
+    req = urllib3.Request(value)
b94b9d
     try:
b94b9d
-        response=urllib2.urlopen(req)
b94b9d
+        response=urllib3.urlopen(req)
b94b9d
         if response.getcode() == 200:
b94b9d
             return response.read()
b94b9d
         else:
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/aliyuncli/six.py b/bundled/aliyun/aliyun-cli/aliyuncli/six.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/aliyuncli/six.py	2018-01-24 04:08:33.000000000 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/aliyuncli/six.py	2019-02-19 11:14:40.505262286 +0100
b94b9d
@@ -340,8 +340,8 @@
b94b9d
 
b94b9d
 
b94b9d
 _urllib_error_moved_attributes = [
b94b9d
-    MovedAttribute("URLError", "urllib2", "urllib.error"),
b94b9d
-    MovedAttribute("HTTPError", "urllib2", "urllib.error"),
b94b9d
+    MovedAttribute("URLError", "urllib3", "urllib.error"),
b94b9d
+    MovedAttribute("HTTPError", "urllib3", "urllib.error"),
b94b9d
     MovedAttribute("ContentTooShortError", "urllib", "urllib.error"),
b94b9d
 ]
b94b9d
 for attr in _urllib_error_moved_attributes:
b94b9d
@@ -359,34 +359,34 @@
b94b9d
 
b94b9d
 
b94b9d
 _urllib_request_moved_attributes = [
b94b9d
-    MovedAttribute("urlopen", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("install_opener", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("build_opener", "urllib2", "urllib.request"),
b94b9d
+    MovedAttribute("urlopen", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("install_opener", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("build_opener", "urllib3", "urllib.request"),
b94b9d
     MovedAttribute("pathname2url", "urllib", "urllib.request"),
b94b9d
     MovedAttribute("url2pathname", "urllib", "urllib.request"),
b94b9d
     MovedAttribute("getproxies", "urllib", "urllib.request"),
b94b9d
-    MovedAttribute("Request", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("OpenerDirector", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPDefaultErrorHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPRedirectHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPCookieProcessor", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("ProxyHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("BaseHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPPasswordMgr", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("AbstractBasicAuthHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPBasicAuthHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("ProxyBasicAuthHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("AbstractDigestAuthHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPDigestAuthHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("ProxyDigestAuthHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPSHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("FileHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("FTPHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("CacheFTPHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("UnknownHandler", "urllib2", "urllib.request"),
b94b9d
-    MovedAttribute("HTTPErrorProcessor", "urllib2", "urllib.request"),
b94b9d
+    MovedAttribute("Request", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("OpenerDirector", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPDefaultErrorHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPRedirectHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPCookieProcessor", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("ProxyHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("BaseHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPPasswordMgr", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPPasswordMgrWithDefaultRealm", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("AbstractBasicAuthHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPBasicAuthHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("ProxyBasicAuthHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("AbstractDigestAuthHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPDigestAuthHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("ProxyDigestAuthHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPSHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("FileHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("FTPHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("CacheFTPHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("UnknownHandler", "urllib3", "urllib.request"),
b94b9d
+    MovedAttribute("HTTPErrorProcessor", "urllib3", "urllib.request"),
b94b9d
     MovedAttribute("urlretrieve", "urllib", "urllib.request"),
b94b9d
     MovedAttribute("urlcleanup", "urllib", "urllib.request"),
b94b9d
     MovedAttribute("URLopener", "urllib", "urllib.request"),
b94b9d
diff -uNr a/bundled/aliyun/aliyun-cli/setup.py b/bundled/aliyun/aliyun-cli/setup.py
b94b9d
--- a/bundled/aliyun/aliyun-cli/setup.py	2018-01-24 04:08:33.000000000 +0100
b94b9d
+++ b/bundled/aliyun/aliyun-cli/setup.py	2019-02-19 13:33:29.069848394 +0100
b94b9d
@@ -24,7 +24,7 @@
b94b9d
 
b94b9d
 install_requires = [
b94b9d
         'colorama>=0.2.5,<=0.3.3',
b94b9d
-        'jmespath>=0.7.0,<=0.7.1',
b94b9d
+        'jmespath>=0.7.0',
b94b9d
         ]
b94b9d
 def main():
b94b9d
     setup(