From 59b85faeb331d3f2aa226ba7077cef6ef57d57d6 Mon Sep 17 00:00:00 2001
From: Josh Bean
Date: Thu, 6 Jul 2017 22:09:31 +0000
Subject: [PATCH 1/6] Improve the pagination help
---
awscli/customizations/paginate.py | 32 ++++++++++++++++++++++++-------
1 file changed, 25 insertions(+), 7 deletions(-)
diff --git a/awscli/customizations/paginate.py b/awscli/customizations/paginate.py
index 7eab6140f1d5..104b3bd61a3d 100644
--- a/awscli/customizations/paginate.py
+++ b/awscli/customizations/paginate.py
@@ -39,19 +39,37 @@
STARTING_TOKEN_HELP = """
A token to specify where to start paginating. This is the
NextToken
from a previously truncated response.
+For more information, see Pagination in the AWS Command Line Interface User
+Guide.
"""
MAX_ITEMS_HELP = """
-The total number of items to return. If the total number
-of items available is more than the value specified in
-max-items then a NextToken
will
-be provided in the output that you can use to resume pagination.
-This NextToken
response element should not be
-used directly outside of the AWS CLI.
+The total number of items to return in the command's output.
+If the total number of items available is more than the value
+specified, a NextToken
is provided in the command's
+output. To resume pagination, provide the
+NextToken
value in the starting-token
+argument of a subsequent command. Do not use the
+NextToken
response element directly outside of the
+AWS CLI.
+For more information, see Pagination in the AWS Command Line Interface User
+Guide.
"""
PAGE_SIZE_HELP = """
-The size of each page.
+
The size of each page to get in the AWS service call. This
+does not affect the number of items returned in the command's
+output. Setting a smaller page size results in more calls to
+the AWS service, retrieving fewer items in each call. This can
+help prevent the AWS service calls from timing out.
+For more information, see Pagination in the AWS Command Line Interface User
+Guide.
"""
From 187f23cb00050c053501cb94ab97e4860f76681a Mon Sep 17 00:00:00 2001
From: Josh Bean
Date: Thu, 6 Jul 2017 15:37:18 -0700
Subject: [PATCH 2/6] Tweak wording per PR comments
---
awscli/customizations/paginate.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/awscli/customizations/paginate.py b/awscli/customizations/paginate.py
index 104b3bd61a3d..35e3bef8c803 100644
--- a/awscli/customizations/paginate.py
+++ b/awscli/customizations/paginate.py
@@ -39,7 +39,7 @@
STARTING_TOKEN_HELP = """
A token to specify where to start paginating. This is the
NextToken
from a previously truncated response.
-For more information, see For usage examples, see Pagination in the AWS Command Line Interface User
Guide.
@@ -54,7 +54,7 @@
argument of a subsequent command. Do not use the
NextToken
response element directly outside of the
AWS CLI.
-For more information, see For usage examples, see Pagination in the AWS Command Line Interface User
Guide.
@@ -66,7 +66,7 @@
output. Setting a smaller page size results in more calls to
the AWS service, retrieving fewer items in each call. This can
help prevent the AWS service calls from timing out.
-For more information, see For usage examples, see Pagination in the AWS Command Line Interface User
Guide.
From 8f1a8acb9668c9714cc952509b9a81cb406b0a3c Mon Sep 17 00:00:00 2001
From: "Ghani, Maaz"
Date: Tue, 11 Jul 2017 18:43:11 -0700
Subject: [PATCH 3/6] fixes query parsing in example
---
awscli/examples/ecr/get-authorization-token.rst | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/awscli/examples/ecr/get-authorization-token.rst b/awscli/examples/ecr/get-authorization-token.rst
index 6f59898cbe3b..69ad91276b7a 100644
--- a/awscli/examples/ecr/get-authorization-token.rst
+++ b/awscli/examples/ecr/get-authorization-token.rst
@@ -32,8 +32,8 @@ returns the decoded password for you to use in a ``docker login`` command.
Command::
aws ecr get-authorization-token --output text \
- --query authorizationData[].authorizationToken \
- | base64 -d | cut -d: -f2
+ --query 'authorizationData[].authorizationToken' \
+ | base64 -D | cut -d: -f2
**To `docker login` with your decoded password**
From 3fb7a14aba1ed69764014204f7aeeb2888d955df Mon Sep 17 00:00:00 2001
From: JordonPhillips
Date: Fri, 21 Jul 2017 15:33:47 -0700
Subject: [PATCH 4/6] Use unicode in result printer
Fixes #2575
---
awscli/customizations/s3/results.py | 14 ++--
tests/unit/customizations/s3/test_results.py | 82 ++++++++++++++++++++
2 files changed, 89 insertions(+), 7 deletions(-)
diff --git a/awscli/customizations/s3/results.py b/awscli/customizations/s3/results.py
index eb22c8b37868..3a8a88b693f6 100644
--- a/awscli/customizations/s3/results.py
+++ b/awscli/customizations/s3/results.py
@@ -353,24 +353,24 @@ class ResultPrinter(BaseResultHandler):
'Completed {files_completed} file(s) with ' + _FILES_REMAINING
)
SUCCESS_FORMAT = (
- '{transfer_type}: {transfer_location}'
+ u'{transfer_type}: {transfer_location}'
)
- DRY_RUN_FORMAT = '(dryrun) ' + SUCCESS_FORMAT
+ DRY_RUN_FORMAT = u'(dryrun) ' + SUCCESS_FORMAT
FAILURE_FORMAT = (
- '{transfer_type} failed: {transfer_location} {exception}'
+ u'{transfer_type} failed: {transfer_location} {exception}'
)
# TODO: Add "warning: " prefix once all commands are converted to using
# result printer and remove "warning: " prefix from ``create_warning``.
WARNING_FORMAT = (
- '{message}'
+ u'{message}'
)
ERROR_FORMAT = (
- 'fatal error: {exception}'
+ u'fatal error: {exception}'
)
CTRL_C_MSG = 'cancelled: ctrl-c received'
- SRC_DEST_TRANSFER_LOCATION_FORMAT = '{src} to {dest}'
- SRC_TRANSFER_LOCATION_FORMAT = '{src}'
+ SRC_DEST_TRANSFER_LOCATION_FORMAT = u'{src} to {dest}'
+ SRC_TRANSFER_LOCATION_FORMAT = u'{src}'
def __init__(self, result_recorder, out_file=None, error_file=None):
"""Prints status of ongoing transfer
diff --git a/tests/unit/customizations/s3/test_results.py b/tests/unit/customizations/s3/test_results.py
index 76d199ecb4ca..228cb2a90434 100644
--- a/tests/unit/customizations/s3/test_results.py
+++ b/tests/unit/customizations/s3/test_results.py
@@ -1406,6 +1406,88 @@ def test_final_total_does_not_print_out_newline_for_no_transfers(self):
self.result_printer(FinalTotalSubmissionsResult(0))
self.assertEqual(self.out_file.getvalue(), '')
+ def test_print_unicode_success_src_and_dest(self):
+ # Pretend that this is the final result in the result queue that
+ # is processed.
+ self.result_recorder.final_expected_files_transferred = 1
+ self.result_recorder.expected_files_transferred = 1
+ self.result_recorder.files_transferred = 1
+
+ result = SuccessResult(
+ transfer_type='upload',
+ src=u'/tmp/\u2713',
+ dest='s3://mybucket/mykey'
+ )
+ self.result_printer(result)
+ expected = u'upload: /tmp/\u2713 to s3://mybucket/mykey\n'
+ self.assertEqual(self.out_file.getvalue(), expected)
+
+ def test_print_unicode_success_src(self):
+ # Pretend that this is the final result in the result queue that
+ # is processed.
+ self.result_recorder.final_expected_files_transferred = 1
+ self.result_recorder.expected_files_transferred = 1
+ self.result_recorder.files_transferred = 1
+
+ result = SuccessResult(
+ transfer_type='delete',
+ src=u's3://mybucket/tmp/\u2713',
+ dest=None
+ )
+ self.result_printer(result)
+ expected = u'delete: s3://mybucket/tmp/\u2713\n'
+ self.assertEqual(self.out_file.getvalue(), expected)
+
+ def test_print_unicode_dryrun(self):
+ result = DryRunResult(
+ transfer_type='upload',
+ src=u's3://mybucket/\u2713',
+ dest='./local/file'
+ )
+ self.result_printer(result)
+ expected = u'(dryrun) upload: s3://mybucket/\u2713 to ./local/file\n'
+ self.assertEqual(self.out_file.getvalue(), expected)
+
+ def test_print_unicode_failure(self):
+ transfer_type = 'upload'
+ src = u'\u2713'
+ dest = 's3://mybucket/mykey'
+
+ # Pretend that this is the final result in the result queue that
+ # is processed.
+ self.result_recorder.final_expected_files_transferred = 1
+ self.result_recorder.expected_files_transferred = 1
+ self.result_recorder.files_transferred = 1
+
+ failure_result = FailureResult(
+ transfer_type=transfer_type, src=src, dest=dest,
+ exception=Exception('my exception'))
+
+ self.result_printer(failure_result)
+
+ ref_failure_statement = (
+ u'upload failed: \u2713 to s3://mybucket/mykey my exception\n'
+ )
+ self.assertEqual(self.error_file.getvalue(), ref_failure_statement)
+ self.assertEqual(self.out_file.getvalue(), '')
+
+ def test_print_unicode_warning(self):
+ # Pretend that this is the final result in the result queue that
+ # is processed.
+ self.result_recorder.final_expected_files_transferred = 1
+ self.result_recorder.expected_files_transferred = 1
+ self.result_recorder.files_transferred = 1
+
+ self.result_printer(WarningResult(u'warning: unicode exists \u2713'))
+ ref_warning_statement = u'warning: unicode exists \u2713\n'
+ self.assertEqual(self.error_file.getvalue(), ref_warning_statement)
+ self.assertEqual(self.out_file.getvalue(), '')
+
+ def test_print_unicode_error(self):
+ self.result_printer(ErrorResult(Exception('unicode exists \u2713')))
+ ref_error_statement = 'fatal error: unicode exists \u2713\n'
+ self.assertEqual(self.error_file.getvalue(), ref_error_statement)
+
class TestOnlyShowErrorsResultPrinter(BaseResultPrinterTest):
def setUp(self):
From 0cd7ec645620cd9af61e23fa6065d83a92f575f7 Mon Sep 17 00:00:00 2001
From: awstools
Date: Mon, 24 Jul 2017 13:28:15 -0700
Subject: [PATCH 5/6] Update changelog based on model updates
---
.changes/next-release/api-change-appstream-1966.json | 5 +++++
.changes/next-release/api-change-ec2-18057.json | 5 +++++
2 files changed, 10 insertions(+)
create mode 100644 .changes/next-release/api-change-appstream-1966.json
create mode 100644 .changes/next-release/api-change-ec2-18057.json
diff --git a/.changes/next-release/api-change-appstream-1966.json b/.changes/next-release/api-change-appstream-1966.json
new file mode 100644
index 000000000000..43c322de2ca6
--- /dev/null
+++ b/.changes/next-release/api-change-appstream-1966.json
@@ -0,0 +1,5 @@
+{
+ "category": "``appstream``",
+ "type": "api-change",
+ "description": "Update appstream command to latest version"
+}
diff --git a/.changes/next-release/api-change-ec2-18057.json b/.changes/next-release/api-change-ec2-18057.json
new file mode 100644
index 000000000000..db9cb4381242
--- /dev/null
+++ b/.changes/next-release/api-change-ec2-18057.json
@@ -0,0 +1,5 @@
+{
+ "category": "``ec2``",
+ "type": "api-change",
+ "description": "Update ec2 command to latest version"
+}
From 1922c4a7d1e06ff039ccf0ddececf69a3b3a7d43 Mon Sep 17 00:00:00 2001
From: awstools
Date: Mon, 24 Jul 2017 13:30:47 -0700
Subject: [PATCH 6/6] Bumping version to 1.11.124
---
.changes/1.11.124.json | 12 ++++++++++++
.changes/next-release/api-change-appstream-1966.json | 5 -----
.changes/next-release/api-change-ec2-18057.json | 5 -----
CHANGELOG.rst | 7 +++++++
awscli/__init__.py | 2 +-
doc/source/conf.py | 2 +-
setup.cfg | 2 +-
setup.py | 2 +-
8 files changed, 23 insertions(+), 14 deletions(-)
create mode 100644 .changes/1.11.124.json
delete mode 100644 .changes/next-release/api-change-appstream-1966.json
delete mode 100644 .changes/next-release/api-change-ec2-18057.json
diff --git a/.changes/1.11.124.json b/.changes/1.11.124.json
new file mode 100644
index 000000000000..b1a68d633068
--- /dev/null
+++ b/.changes/1.11.124.json
@@ -0,0 +1,12 @@
+[
+ {
+ "category": "``ec2``",
+ "description": "Update ec2 command to latest version",
+ "type": "api-change"
+ },
+ {
+ "category": "``appstream``",
+ "description": "Update appstream command to latest version",
+ "type": "api-change"
+ }
+]
\ No newline at end of file
diff --git a/.changes/next-release/api-change-appstream-1966.json b/.changes/next-release/api-change-appstream-1966.json
deleted file mode 100644
index 43c322de2ca6..000000000000
--- a/.changes/next-release/api-change-appstream-1966.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "category": "``appstream``",
- "type": "api-change",
- "description": "Update appstream command to latest version"
-}
diff --git a/.changes/next-release/api-change-ec2-18057.json b/.changes/next-release/api-change-ec2-18057.json
deleted file mode 100644
index db9cb4381242..000000000000
--- a/.changes/next-release/api-change-ec2-18057.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "category": "``ec2``",
- "type": "api-change",
- "description": "Update ec2 command to latest version"
-}
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 46bab8806593..f2413c6a8c35 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -2,6 +2,13 @@
CHANGELOG
=========
+1.11.124
+========
+
+* api-change:``ec2``: Update ec2 command to latest version
+* api-change:``appstream``: Update appstream command to latest version
+
+
1.11.123
========
diff --git a/awscli/__init__.py b/awscli/__init__.py
index a6f4d61a8c2c..a6beb089fe5b 100644
--- a/awscli/__init__.py
+++ b/awscli/__init__.py
@@ -17,7 +17,7 @@
"""
import os
-__version__ = '1.11.123'
+__version__ = '1.11.124'
#
# Get our data path to be added to botocore's search path
diff --git a/doc/source/conf.py b/doc/source/conf.py
index 3ab1379da203..e8c2b29e521c 100644
--- a/doc/source/conf.py
+++ b/doc/source/conf.py
@@ -52,7 +52,7 @@
# The short X.Y version.
version = '1.11.1'
# The full version, including alpha/beta/rc tags.
-release = '1.11.123'
+release = '1.11.124'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
diff --git a/setup.cfg b/setup.cfg
index af2722fc9bc4..8e1a731db797 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -4,7 +4,7 @@ universal = 1
[metadata]
requires-dist =
- botocore==1.5.86
+ botocore==1.5.87
colorama>=0.2.5,<=0.3.7
docutils>=0.10
rsa>=3.1.2,<=3.5.0
diff --git a/setup.py b/setup.py
index 57d2a0daa8fa..e028a5fb3ca4 100644
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ def find_version(*file_paths):
raise RuntimeError("Unable to find version string.")
-requires = ['botocore==1.5.86',
+requires = ['botocore==1.5.87',
'colorama>=0.2.5,<=0.3.7',
'docutils>=0.10',
'rsa>=3.1.2,<=3.5.0',