Hello community, here is the log from the commit of package aws-cli for openSUSE:Factory checked in at 2018-09-18 11:47:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/aws-cli (Old) and /work/SRC/openSUSE:Factory/.aws-cli.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "aws-cli" Tue Sep 18 11:47:56 2018 rev:18 rq:636198 version:1.16.1 Changes: -------- --- /work/SRC/openSUSE:Factory/aws-cli/aws-cli.changes 2018-08-27 12:57:46.988713534 +0200 +++ /work/SRC/openSUSE:Factory/.aws-cli.new/aws-cli.changes 2018-09-18 11:48:09.163616795 +0200 @@ -1,0 +2,11 @@ +Thu Sep 13 10:23:47 UTC 2018 - John Paul Adrian Glaubitz <[email protected]> + +- Update to version 1.16.1 (bsc#1105988, bsc#1092493) + + Fix CVE-2018-15869 + + For detailed changes see + https://github.com/aws/aws-cli/blob/1.16.1/CHANGELOG.rst + + Forward port hide_py_pckgmgmt.patch + + Replace vendored version of six from botocore with upstream version + + Update Requires in spec file from setup.py + +------------------------------------------------------------------- Old: ---- aws-cli-1.15.76.tar.gz New: ---- aws-cli-1.16.1.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ aws-cli.spec ++++++ --- /var/tmp/diff_new_pack.A2Ixx8/_old 2018-09-18 11:48:14.587611197 +0200 +++ /var/tmp/diff_new_pack.A2Ixx8/_new 2018-09-18 11:48:14.587611197 +0200 @@ -17,7 +17,7 @@ Name: aws-cli -Version: 1.15.76 +Version: 1.16.1 Release: 0 Summary: Amazon Web Services Command Line Interface License: Apache-2.0 @@ -29,7 +29,7 @@ Requires: python3 Requires: python3-PyYAML <= 4.0 Requires: python3-PyYAML >= 3.10 -Requires: python3-botocore >= 1.10.75 +Requires: python3-botocore >= 1.11.1 Requires: python3-colorama <= 0.3.9 Requires: python3-colorama >= 0.2.5 Requires: python3-docutils >= 0.10 @@ -37,13 +37,14 @@ Requires: python3-rsa >= 3.1.2 Requires: python3-s3transfer <= 0.2.0 Requires: python3-s3transfer >= 0.1.12 +Requires: python3-six BuildRequires: python3-devel BuildRequires: python3-setuptools %else Requires: python Requires: python-PyYAML <= 3.13 Requires: python-PyYAML >= 3.10 -Requires: python-botocore >= 1.10.75 +Requires: python-botocore >= 1.11.1 Requires: python-colorama <= 0.3.9 Requires: python-colorama >= 0.2.5 Requires: python-docutils >= 0.10 @@ -51,6 +52,7 @@ Requires: python-rsa >= 3.1.2 Requires: python-s3transfer <= 0.2.0 Requires: python-s3transfer >= 0.1.12 +Requires: python-six BuildRequires: python-devel BuildRequires: python-setuptools %endif @@ -64,6 +66,8 @@ %prep %setup -q %patch0 +sed -i 's/from botocore\.vendored //' awscli/customizations/awslambda.py +sed -i 's/botocore\.vendored\.//' awscli/customizations/configure/__init__.py %build %if 0%{?suse_version} && 0%{?suse_version} > 1315 ++++++ aws-cli-1.15.76.tar.gz -> aws-cli-1.16.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.77.json new/aws-cli-1.16.1/.changes/1.15.77.json --- old/aws-cli-1.15.76/.changes/1.15.77.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.77.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,7 @@ +[ + { + "category": "``sagemaker``", + "description": "Update sagemaker command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.78.json new/aws-cli-1.16.1/.changes/1.15.78.json --- old/aws-cli-1.15.76/.changes/1.15.78.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.78.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,17 @@ +[ + { + "category": "``autoscaling``", + "description": "Update autoscaling command to latest version", + "type": "api-change" + }, + { + "category": "``cloudfront``", + "description": "Update cloudfront command to latest version", + "type": "api-change" + }, + { + "category": "``es``", + "description": "Update es command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.79.json new/aws-cli-1.16.1/.changes/1.15.79.json --- old/aws-cli-1.15.76/.changes/1.15.79.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.79.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,7 @@ +[ + { + "category": "``devicefarm``", + "description": "Update devicefarm command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.80.json new/aws-cli-1.16.1/.changes/1.15.80.json --- old/aws-cli-1.15.76/.changes/1.15.80.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.80.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,27 @@ +[ + { + "category": "``discovery``", + "description": "Update discovery command to latest version", + "type": "api-change" + }, + { + "category": "``mediaconvert``", + "description": "Update mediaconvert command to latest version", + "type": "api-change" + }, + { + "category": "``ec2``", + "description": "Update ec2 command to latest version", + "type": "api-change" + }, + { + "category": "``ssm``", + "description": "Update ssm command to latest version", + "type": "api-change" + }, + { + "category": "``redshift``", + "description": "Update redshift command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.81.json new/aws-cli-1.16.1/.changes/1.15.81.json --- old/aws-cli-1.15.76/.changes/1.15.81.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.81.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,17 @@ +[ + { + "category": "``secretsmanager``", + "description": "Update secretsmanager command to latest version", + "type": "api-change" + }, + { + "category": "``dax``", + "description": "Update dax command to latest version", + "type": "api-change" + }, + { + "category": "``sagemaker``", + "description": "Update sagemaker command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.82.json new/aws-cli-1.16.1/.changes/1.15.82.json --- old/aws-cli-1.15.76/.changes/1.15.82.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.82.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,12 @@ +[ + { + "category": "``mediaconvert``", + "description": "Update mediaconvert command to latest version", + "type": "api-change" + }, + { + "category": "``dynamodb``", + "description": "Update dynamodb command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.83.json new/aws-cli-1.16.1/.changes/1.15.83.json --- old/aws-cli-1.15.76/.changes/1.15.83.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.83.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,22 @@ +[ + { + "category": "``elasticbeanstalk``", + "description": "Update elasticbeanstalk command to latest version", + "type": "api-change" + }, + { + "category": "``ec2``", + "description": "Update ec2 command to latest version", + "type": "api-change" + }, + { + "category": "``rds``", + "description": "Update rds command to latest version", + "type": "api-change" + }, + { + "category": "``dlm``", + "description": "Update dlm command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.84.json new/aws-cli-1.16.1/.changes/1.15.84.json --- old/aws-cli-1.15.76/.changes/1.15.84.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.84.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,7 @@ +[ + { + "category": "``snowball``", + "description": "Update snowball command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.15.85.json new/aws-cli-1.16.1/.changes/1.15.85.json --- old/aws-cli-1.15.76/.changes/1.15.85.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.15.85.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,27 @@ +[ + { + "category": "``iotanalytics``", + "description": "Update iotanalytics command to latest version", + "type": "api-change" + }, + { + "category": "``medialive``", + "description": "Update medialive command to latest version", + "type": "api-change" + }, + { + "category": "``rekognition``", + "description": "Update rekognition command to latest version", + "type": "api-change" + }, + { + "category": "``iot``", + "description": "Update iot command to latest version", + "type": "api-change" + }, + { + "category": "``lex-models``", + "description": "Update lex-models command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.16.0.json new/aws-cli-1.16.1/.changes/1.16.0.json --- old/aws-cli-1.15.76/.changes/1.16.0.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.16.0.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,17 @@ +[ + { + "category": "``events``", + "description": "Update events command to latest version", + "type": "api-change" + }, + { + "category": "urllib3", + "description": "Add support for ipv6 proxies by upgrading urllib3 version.", + "type": "feature" + }, + { + "category": "``cognito-idp``", + "description": "Update cognito-idp command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/.changes/1.16.1.json new/aws-cli-1.16.1/.changes/1.16.1.json --- old/aws-cli-1.15.76/.changes/1.16.1.json 1970-01-01 01:00:00.000000000 +0100 +++ new/aws-cli-1.16.1/.changes/1.16.1.json 2018-08-25 03:51:52.000000000 +0200 @@ -0,0 +1,7 @@ +[ + { + "category": "``glue``", + "description": "Update glue command to latest version", + "type": "api-change" + } +] \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/CHANGELOG.rst new/aws-cli-1.16.1/CHANGELOG.rst --- old/aws-cli-1.15.76/CHANGELOG.rst 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/CHANGELOG.rst 2018-08-25 03:51:52.000000000 +0200 @@ -2,6 +2,90 @@ CHANGELOG ========= +1.16.1 +====== + +* api-change:``glue``: Update glue command to latest version + + +1.16.0 +====== + +* api-change:``events``: Update events command to latest version +* feature:urllib3: Add support for ipv6 proxies by upgrading urllib3 version. +* api-change:``cognito-idp``: Update cognito-idp command to latest version + + +1.15.85 +======= + +* api-change:``iotanalytics``: Update iotanalytics command to latest version +* api-change:``medialive``: Update medialive command to latest version +* api-change:``rekognition``: Update rekognition command to latest version +* api-change:``iot``: Update iot command to latest version +* api-change:``lex-models``: Update lex-models command to latest version + + +1.15.84 +======= + +* api-change:``snowball``: Update snowball command to latest version + + +1.15.83 +======= + +* api-change:``elasticbeanstalk``: Update elasticbeanstalk command to latest version +* api-change:``ec2``: Update ec2 command to latest version +* api-change:``rds``: Update rds command to latest version +* api-change:``dlm``: Update dlm command to latest version + + +1.15.82 +======= + +* api-change:``mediaconvert``: Update mediaconvert command to latest version +* api-change:``dynamodb``: Update dynamodb command to latest version + + +1.15.81 +======= + +* api-change:``secretsmanager``: Update secretsmanager command to latest version +* api-change:``dax``: Update dax command to latest version +* api-change:``sagemaker``: Update sagemaker command to latest version + + +1.15.80 +======= + +* api-change:``discovery``: Update discovery command to latest version +* api-change:``mediaconvert``: Update mediaconvert command to latest version +* api-change:``ec2``: Update ec2 command to latest version +* api-change:``ssm``: Update ssm command to latest version +* api-change:``redshift``: Update redshift command to latest version + + +1.15.79 +======= + +* api-change:``devicefarm``: Update devicefarm command to latest version + + +1.15.78 +======= + +* api-change:``autoscaling``: Update autoscaling command to latest version +* api-change:``cloudfront``: Update cloudfront command to latest version +* api-change:``es``: Update es command to latest version + + +1.15.77 +======= + +* api-change:``sagemaker``: Update sagemaker command to latest version + + 1.15.76 ======= diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/awscli/__init__.py new/aws-cli-1.16.1/awscli/__init__.py --- old/aws-cli-1.15.76/awscli/__init__.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/awscli/__init__.py 2018-08-25 03:51:52.000000000 +0200 @@ -17,7 +17,7 @@ """ import os -__version__ = '1.15.76' +__version__ = '1.16.1' # # Get our data path to be added to botocore's search path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/awscli/clidriver.py new/aws-cli-1.16.1/awscli/clidriver.py --- old/aws-cli-1.15.76/awscli/clidriver.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/awscli/clidriver.py 2018-08-25 03:51:52.000000000 +0200 @@ -16,7 +16,7 @@ import botocore.session from botocore import __version__ as botocore_version -from botocore.hooks import HierarchicalEmitter +from botocore.hooks import AliasedEventEmitter from botocore import xform_name from botocore.compat import copy_kwargs, OrderedDict from botocore.exceptions import NoCredentialsError @@ -62,7 +62,7 @@ def create_clidriver(): - emitter = HierarchicalEmitter() + emitter = AliasedEventEmitter() session = botocore.session.Session(EnvironmentVariables, emitter) _set_user_agent_for_session(session) load_plugins(session.full_config.get('plugins', {}), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/awscli/paramfile.py new/aws-cli-1.16.1/awscli/paramfile.py --- old/aws-cli-1.15.76/awscli/paramfile.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/awscli/paramfile.py 2018-08-25 03:51:52.000000000 +0200 @@ -14,7 +14,8 @@ import os import copy -from botocore.vendored import requests +from botocore.awsrequest import AWSRequest +from botocore.httpsession import URLLib3Session from botocore.exceptions import ProfileNotFound from awscli.compat import six @@ -225,7 +226,8 @@ def get_uri(prefix, uri): try: - r = requests.get(uri) + session = URLLib3Session() + r = session.send(AWSRequest('GET', uri).prepare()) if r.status_code == 200: return r.text else: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/awscli/plugin.py new/aws-cli-1.16.1/awscli/plugin.py --- old/aws-cli-1.15.76/awscli/plugin.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/awscli/plugin.py 2018-08-25 03:51:52.000000000 +0200 @@ -13,6 +13,7 @@ import logging from botocore.hooks import HierarchicalEmitter +from botocore.hooks import AliasedEventEmitter log = logging.getLogger('awscli.plugin') @@ -43,7 +44,7 @@ plugin_mapping.update(BUILTIN_PLUGINS) modules = _import_plugins(plugin_mapping) if event_hooks is None: - event_hooks = HierarchicalEmitter() + event_hooks = AliasedEventEmitter() for name, plugin in zip(plugin_mapping.keys(), modules): log.debug("Initializing plugin %s: %s", name, plugin) plugin.awscli_initialize(event_hooks) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/awscli/testutils.py new/aws-cli-1.16.1/awscli/testutils.py --- old/aws-cli-1.15.76/awscli/testutils.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/awscli/testutils.py 2018-08-25 03:51:52.000000000 +0200 @@ -52,7 +52,7 @@ from botocore.exceptions import ClientError from botocore.exceptions import WaiterError import botocore.loaders -from botocore.vendored import requests +from botocore.awsrequest import AWSResponse import awscli.clidriver from awscli.plugin import load_plugins @@ -357,8 +357,7 @@ } self.environ_patch = mock.patch('os.environ', self.environ) self.environ_patch.start() - self.http_response = requests.models.Response() - self.http_response.status_code = 200 + self.http_response = AWSResponse(None, 200, {}, None) self.parsed_response = {} self.make_request_patch = mock.patch('botocore.endpoint.Endpoint.make_request') self.make_request_is_patched = False @@ -475,7 +474,8 @@ } self.environ_patch = mock.patch('os.environ', self.environ) self.environ_patch.start() - self.send_patch = mock.patch('botocore.endpoint.Session.send') + # TODO: fix this patch when we have a better way to stub out responses + self.send_patch = mock.patch('botocore.endpoint.Endpoint._send') self.send_is_patched = False self.driver = create_clidriver() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/doc/source/conf.py new/aws-cli-1.16.1/doc/source/conf.py --- old/aws-cli-1.15.76/doc/source/conf.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/doc/source/conf.py 2018-08-25 03:51:52.000000000 +0200 @@ -50,9 +50,9 @@ # built documents. # # The short X.Y version. -version = '1.15.' +version = '1.16' # The full version, including alpha/beta/rc tags. -release = '1.15.76' +release = '1.16.1' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/setup.cfg new/aws-cli-1.16.1/setup.cfg --- old/aws-cli-1.15.76/setup.cfg 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/setup.cfg 2018-08-25 03:51:52.000000000 +0200 @@ -4,7 +4,7 @@ [metadata] requires-dist = - botocore==1.10.75 + botocore==1.11.1 colorama>=0.2.5,<=0.3.9 docutils>=0.10 rsa>=3.1.2,<=3.5.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/setup.py new/aws-cli-1.16.1/setup.py --- old/aws-cli-1.15.76/setup.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/setup.py 2018-08-25 03:51:52.000000000 +0200 @@ -23,7 +23,7 @@ raise RuntimeError("Unable to find version string.") -requires = ['botocore==1.10.75', +requires = ['botocore==1.11.1', 'colorama>=0.2.5,<=0.3.9', 'docutils>=0.10', 'rsa>=3.1.2,<=3.5.0', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/tests/functional/configservice/test_subscribe.py new/aws-cli-1.16.1/tests/functional/configservice/test_subscribe.py --- old/aws-cli-1.15.76/tests/functional/configservice/test_subscribe.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/tests/functional/configservice/test_subscribe.py 2018-08-25 03:51:52.000000000 +0200 @@ -111,7 +111,8 @@ ) def test_subscribe_when_bucket_needs_to_be_created(self): - with mock.patch('botocore.endpoint.Session.send') as \ + # TODO: fix this patch when we have a better way to stub out responses + with mock.patch('botocore.endpoint.Endpoint._send') as \ http_session_send_patch: # Mock for HeadBucket request head_bucket_response = mock.Mock() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/tests/functional/test_paramfile.py new/aws-cli-1.16.1/tests/functional/test_paramfile.py --- old/aws-cli-1.15.76/tests/functional/test_paramfile.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/tests/functional/test_paramfile.py 2018-08-25 03:51:52.000000000 +0200 @@ -55,27 +55,25 @@ expected_param='foobar' ) - @patch('awscli.paramfile.requests.get') - def test_does_use_http_prefix(self, mock_get): + @patch('awscli.paramfile.URLLib3Session.send') + def test_does_use_http_prefix(self, mock_send): content = 'http_content' - mock_get.return_value = FakeResponse(content=content) + mock_send.return_value = FakeResponse(content=content) param = 'http://foobar.com' self.assert_param_expansion_is_correct( provided_param=param, expected_param=content ) - mock_get.assert_called_with(param) - @patch('awscli.paramfile.requests.get') - def test_does_use_https_prefix(self, mock_get): + @patch('awscli.paramfile.URLLib3Session.send') + def test_does_use_https_prefix(self, mock_send): content = 'https_content' - mock_get.return_value = FakeResponse(content=content) + mock_send.return_value = FakeResponse(content=content) param = 'https://foobar.com' self.assert_param_expansion_is_correct( provided_param=param, expected_param=content ) - mock_get.assert_called_with(param) def test_does_use_file_prefix(self): path = self.files.create_file('foobar.txt', 'file content') @@ -112,23 +110,23 @@ expected_param=param ) - @patch('awscli.paramfile.requests.get') - def test_does_not_use_http_prefix(self, mock_get): + @patch('awscli.paramfile.URLLib3Session.send') + def test_does_not_use_http_prefix(self, mock_send): param = 'http://foobar' self.assert_param_expansion_is_correct( provided_param=param, expected_param=param ) - mock_get.assert_not_called() + mock_send.assert_not_called() - @patch('awscli.paramfile.requests.get') - def test_does_not_use_https_prefix(self, mock_get): + @patch('awscli.paramfile.URLLib3Session.send') + def test_does_not_use_https_prefix(self, mock_send): param = 'https://foobar' self.assert_param_expansion_is_correct( provided_param=param, expected_param=param ) - mock_get.assert_not_called() + mock_send.assert_not_called() def test_does_use_file_prefix(self): path = self.files.create_file('foobar.txt', 'file content') @@ -161,27 +159,25 @@ def test_does_not_prefixes_when_none_in_param(self): self.assert_param_expansion_is_correct('foobar', 'foobar') - @patch('awscli.paramfile.requests.get') - def test_does_use_http_prefix(self, mock_get): + @patch('awscli.paramfile.URLLib3Session.send') + def test_does_use_http_prefix(self, mock_send): content = 'http_content' - mock_get.return_value = FakeResponse(content=content) + mock_send.return_value = FakeResponse(content=content) param = 'http://foobar.com' self.assert_param_expansion_is_correct( provided_param=param, expected_param=content ) - mock_get.assert_called_with(param) - @patch('awscli.paramfile.requests.get') - def test_does_use_https_prefix(self, mock_get): + @patch('awscli.paramfile.URLLib3Session.send') + def test_does_use_https_prefix(self, mock_send): content = 'https_content' - mock_get.return_value = FakeResponse(content=content) + mock_send.return_value = FakeResponse(content=content) param = 'https://foobar.com' self.assert_param_expansion_is_correct( provided_param=param, expected_param=content ) - mock_get.assert_called_with(param) def test_does_use_file_prefix(self): path = self.files.create_file('foobar.txt', 'file content') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/tests/unit/customizations/emr/test_add_instance_groups.py new/aws-cli-1.16.1/tests/unit/customizations/emr/test_add_instance_groups.py --- old/aws-cli-1.15.76/tests/unit/customizations/emr/test_add_instance_groups.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/tests/unit/customizations/emr/test_add_instance_groups.py 2018-08-25 03:51:52.000000000 +0200 @@ -17,7 +17,6 @@ CONSTANTS import json from mock import patch -from botocore.vendored import requests INSTANCE_GROUPS_WITH_AUTOSCALING_POLICY = ( ' InstanceGroupType=TASK,InstanceType=d2.xlarge,InstanceCount=2,' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/tests/unit/customizations/emr/test_create_cluster_ami_version.py new/aws-cli-1.16.1/tests/unit/customizations/emr/test_create_cluster_ami_version.py --- old/aws-cli-1.15.76/tests/unit/customizations/emr/test_create_cluster_ami_version.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/tests/unit/customizations/emr/test_create_cluster_ami_version.py 2018-08-25 03:51:52.000000000 +0200 @@ -21,7 +21,6 @@ import os import json from mock import patch -from botocore.vendored import requests DEFAULT_CLUSTER_NAME = "Development Cluster" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/tests/unit/customizations/emr/test_create_default_role.py new/aws-cli-1.16.1/tests/unit/customizations/emr/test_create_default_role.py --- old/aws-cli-1.15.76/tests/unit/customizations/emr/test_create_default_role.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/tests/unit/customizations/emr/test_create_default_role.py 2018-08-25 03:51:52.000000000 +0200 @@ -13,7 +13,7 @@ import mock from botocore.compat import json -from botocore.vendored import requests +from botocore.awsrequest import AWSResponse from botocore.exceptions import ClientError import awscli.customizations.emr.emrutils as emrutils @@ -77,8 +77,7 @@ } ] -http_response = requests.models.Response() -http_response.status_code = 200 +http_response = AWSResponse(None, 200, {}, None) CN_EC2_ROLE_ARN = ('arn:aws-cn:iam::aws:policy/service-role/' 'AmazonElasticMapReduceforEC2Role') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/tests/unit/test_clidriver.py new/aws-cli-1.16.1/tests/unit/test_clidriver.py --- old/aws-cli-1.15.76/tests/unit/test_clidriver.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/tests/unit/test_clidriver.py 2018-08-25 03:51:52.000000000 +0200 @@ -20,7 +20,7 @@ import mock import nose from awscli.compat import six -from botocore.vendored.requests import models +from botocore.awsrequest import AWSResponse from botocore.exceptions import NoCredentialsError from botocore.compat import OrderedDict import botocore.model @@ -717,8 +717,7 @@ self.endpoint = self.create_endpoint.return_value self.endpoint.host = 'https://example.com' # Have the endpoint give a dummy empty response. - http_response = models.Response() - http_response.status_code = 200 + http_response = AWSResponse(None, 200, {}, None) self.endpoint.make_request.return_value = ( http_response, {}) @@ -812,7 +811,7 @@ error_msg = ("Error parsing parameter '--filters': " "Unable to retrieve http://does/not/exist.json: " "received non 200 status code of 404") - with mock.patch('botocore.vendored.requests.get') as get: + with mock.patch('awscli.paramfile.URLLib3Session.send') as get: get.return_value.status_code = 404 self.assert_params_for_cmd( 'ec2 describe-instances --filters http://does/not/exist.json', diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/tests/unit/test_paramfile.py new/aws-cli-1.16.1/tests/unit/test_paramfile.py --- old/aws-cli-1.15.76/tests/unit/test_paramfile.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/tests/unit/test_paramfile.py 2018-08-25 03:51:52.000000000 +0200 @@ -70,13 +70,13 @@ class TestHTTPBasedResourceLoading(unittest.TestCase): def setUp(self): - self.requests_patch = mock.patch('awscli.paramfile.requests') - self.requests_mock = self.requests_patch.start() + self.session_patch = mock.patch('awscli.paramfile.URLLib3Session.send') + self.session_mock = self.session_patch.start() self.response = mock.Mock(status_code=200) - self.requests_mock.get.return_value = self.response + self.session_mock.return_value = self.response def tearDown(self): - self.requests_patch.stop() + self.session_patch.stop() def get_paramfile(self, path): return get_paramfile(path, REMOTE_PREFIX_MAP.copy()) @@ -85,13 +85,11 @@ self.response.text = 'http contents' loaded = self.get_paramfile('http://foo.bar.baz') self.assertEqual(loaded, 'http contents') - self.requests_mock.get.assert_called_with('http://foo.bar.baz') def test_resource_from_https(self): self.response.text = 'http contents' loaded = self.get_paramfile('https://foo.bar.baz') self.assertEqual(loaded, 'http contents') - self.requests_mock.get.assert_called_with('https://foo.bar.baz') def test_non_200_raises_error(self): self.response.status_code = 500 @@ -99,7 +97,7 @@ self.get_paramfile('https://foo.bar.baz') def test_connection_error_raises_error(self): - self.requests_mock.get.side_effect = Exception("Connection error.") + self.session_mock.side_effect = Exception("Connection error.") with self.assertRaisesRegexp(ResourceLoadingError, 'foo\.bar\.baz'): self.get_paramfile('https://foo.bar.baz') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/aws-cli-1.15.76/tests/unit/test_testutils.py new/aws-cli-1.16.1/tests/unit/test_testutils.py --- old/aws-cli-1.15.76/tests/unit/test_testutils.py 2018-08-10 22:13:09.000000000 +0200 +++ new/aws-cli-1.16.1/tests/unit/test_testutils.py 2018-08-25 03:51:52.000000000 +0200 @@ -18,7 +18,8 @@ class TestCreateBucket(BaseCLIDriverTest): def test_bucket_already_owned_by_you(self): - with mock.patch('botocore.endpoint.Session.send') as _send: + # TODO: fix this patch when we have a better way to stub out responses + with mock.patch('botocore.endpoint.Endpoint._send') as _send: _send.side_effect = [ mock.Mock(status_code=500, headers={}, content=b''), mock.Mock( ++++++ hide_py_pckgmgmt.patch ++++++ --- /var/tmp/diff_new_pack.A2Ixx8/_old 2018-09-18 11:48:14.955610817 +0200 +++ /var/tmp/diff_new_pack.A2Ixx8/_new 2018-09-18 11:48:14.955610817 +0200 @@ -1,16 +1,16 @@ ---- setup.py.orig 2018-08-10 22:13:09.000000000 +0200 -+++ setup.py 2018-08-13 16:41:02.210656456 +0200 +--- setup.py.orig 2018-08-25 03:51:52.000000000 +0200 ++++ setup.py 2018-08-25 17:41:34.441844517 +0200 @@ -23,18 +23,18 @@ raise RuntimeError("Unable to find version string.") --requires = ['botocore==1.10.75', +-requires = ['botocore==1.11.1', - 'colorama>=0.2.5,<=0.3.9', - 'docutils>=0.10', - 'rsa>=3.1.2,<=3.5.0', - 's3transfer>=0.1.12,<0.2.0', - 'PyYAML>=3.10,<=3.13'] -+# requires = ['botocore==1.10.75', ++# requires = ['botocore==1.11.1', +# 'colorama>=0.2.5,<=0.3.9', +# 'docutils>=0.10', +# 'rsa>=3.1.2,<=3.5.0',
