Blame SOURCES/aliyuncli-python3-fixes.patch

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