Revise patches and update to 2.22.9

Update to 2.22.9 and revise patches to reflect code changes

Remove patch hunks that fixed whitespace errors which are no
longer present in release

Remove patch hunk which stops the initialization of io.BufferedIOBase
with arbitrary binary data. The latest code post adding support
for python 3.12 instantiates a BufferedStream class which
requires initialization

Stop applying assertions.patch to fix EKS test suite. This test suite
is no longer broken: https://github.com/aws/aws-cli/pull/8917

Resolves: RHEL-66152

Signed-off-by: ccowman <ccowman@redhat.com>
This commit is contained in:
ccowman 2024-12-20 17:43:40 +00:00
parent 735256a4e7
commit 20258e0b59
4 changed files with 6 additions and 63 deletions

1
.gitignore vendored
View File

@ -38,3 +38,4 @@
/aws-cli-2.17.6.tar.gz /aws-cli-2.17.6.tar.gz
/aws-cli-2.17.13.tar.gz /aws-cli-2.17.13.tar.gz
/aws-cli-2.17.18.tar.gz /aws-cli-2.17.18.tar.gz
/aws-cli-2.22.9.tar.gz

View File

@ -1,7 +1,7 @@
%global pkgname aws-cli %global pkgname aws-cli
Name: awscli2 Name: awscli2
Version: 2.17.18 Version: 2.22.9
Release: %autorelease Release: %autorelease
Summary: Universal Command Line Environment for AWS, version 2 Summary: Universal Command Line Environment for AWS, version 2
@ -17,12 +17,10 @@ Source0: https://github.com/aws/aws-cli/archive/%{version}/%{pkgname}
Patch0: ruamel-yaml-0.17.32.patch Patch0: ruamel-yaml-0.17.32.patch
# fix Python 3.12 incompatibilities # fix Python 3.12 incompatibilities
Patch1: python312.patch Patch1: python312.patch
# fix incorrect assertions in TestKubeconfigLoader
Patch2: assertions.patch
# Bump ceiling for botocore memory leak tests # Bump ceiling for botocore memory leak tests
# https://github.com/aws/aws-cli/pull/8744 # https://github.com/aws/aws-cli/pull/8744
# https://github.com/boto/botocore/issues/3205 # https://github.com/boto/botocore/issues/3205
Patch3: 0001-Bump-the-ceiling-for-botocore-memory-leak-tests-to-1.patch Patch2: 0001-Bump-the-ceiling-for-botocore-memory-leak-tests-to-1.patch
BuildArch: noarch BuildArch: noarch

View File

@ -712,41 +712,6 @@ index 19d559ac..e7db8d8b 100644
def tearDown(self): def tearDown(self):
self.datetime_patcher.stop() self.datetime_patcher.stop()
diff --git a/tests/unit/botocore/test_client.py b/tests/unit/botocore/test_client.py
index 464cc354..2455fc5f 100644
--- a/tests/unit/botocore/test_client.py
+++ b/tests/unit/botocore/test_client.py
@@ -969,7 +969,7 @@ class TestAutoGeneratedClient(unittest.TestCase):
lines = [
(' Creates an iterator that will paginate through responses '
'from :py:meth:`MyService.Client.test_operation`.'),
- ' **Request Syntax** ',
+ ' **Request Syntax**',
' ::',
' response_iterator = paginator.paginate(',
" Foo='string',",
@@ -985,17 +985,17 @@ class TestAutoGeneratedClient(unittest.TestCase):
' :type Bar: string',
' :param Bar: Documents Bar',
' :type PaginationConfig: dict',
- ' :param PaginationConfig: ',
+ ' :param PaginationConfig:',
(' A dictionary that provides parameters to control '
'pagination.'),
- ' - **MaxItems** *(integer) --* ',
+ ' - **MaxItems** *(integer) --*',
(' 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.'),
- ' - **PageSize** *(integer) --* ',
+ ' - **PageSize** *(integer) --*',
' The size of each page.',
- ' - **StartingToken** *(string) --* ',
+ ' - **StartingToken** *(string) --*',
(' A token to specify where to start paginating. This is '
'the ``NextToken`` from a previous response.'),
' :returns: None',
diff --git a/tests/unit/botocore/test_credentials.py b/tests/unit/botocore/test_credentials.py diff --git a/tests/unit/botocore/test_credentials.py b/tests/unit/botocore/test_credentials.py
index b9931216..7fdcf4ba 100644 index b9931216..7fdcf4ba 100644
--- a/tests/unit/botocore/test_credentials.py --- a/tests/unit/botocore/test_credentials.py
@ -862,16 +827,7 @@ index b4699c6c..2d128bf1 100644
DT_FORMAT = "%Y-%m-%dT%H:%M:%SZ" DT_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
@@ -1052,7 +1052,7 @@ class TestSwitchToChunkedEncodingForNonSeekableObjects(unittest.TestCase): @@ -2913,7 +2913,7 @@ class TestInstanceMetadataFetcher(unittest.TestCase):
def test_switch_to_chunked_encodeing_for_stream_like_object(self):
request = AWSRequest(
method='POST', headers={},
- data=io.BufferedIOBase(b"some initial binary data"),
+ data=io.BufferedIOBase(),
url='https://foo.amazonaws.com/bucket/key.txt'
)
prepared_request = request.prepare()
@@ -2867,7 +2867,7 @@ class TestInstanceMetadataFetcher(unittest.TestCase):
self, dt=None, offset=None, offset_func=operator.add self, dt=None, offset=None, offset_func=operator.add
): ):
if dt is None: if dt is None:
@ -880,19 +836,7 @@ index b4699c6c..2d128bf1 100644
if offset is not None: if offset is not None:
dt = offset_func(dt, offset) dt = offset_func(dt, offset)
diff --git a/tests/unit/botocore/test_waiters.py b/tests/unit/botocore/test_waiters.py
index c5876f5b..ea393ae9 100644
--- a/tests/unit/botocore/test_waiters.py
+++ b/tests/unit/botocore/test_waiters.py
@@ -646,7 +646,7 @@ class TestCreateWaiter(unittest.TestCase):
(' Polls :py:meth:`MyService.Client.foo` every 1 '
'seconds until a successful state is reached. An error '
'is returned after 1 failed checks.'),
- ' **Request Syntax** ',
+ ' **Request Syntax**',
' ::',
' waiter.wait(',
" bar='string'",
diff --git a/tests/unit/customizations/eks/test_get_token.py b/tests/unit/customizations/eks/test_get_token.py diff --git a/tests/unit/customizations/eks/test_get_token.py b/tests/unit/customizations/eks/test_get_token.py
index 9575aa0d..2664e1fe 100644 index 9575aa0d..2664e1fe 100644
--- a/tests/unit/customizations/eks/test_get_token.py --- a/tests/unit/customizations/eks/test_get_token.py

View File

@ -1 +1 @@
SHA512 (aws-cli-2.17.18.tar.gz) = 33fd535deefdd214c1b92f4941a83225969b33230dcfa70fea2114be06a92161a97e641fe8bb43bb0f57249ab17593a197b678a3d1dd7d68d244fd8dd64fbb3c SHA512 (aws-cli-2.22.9.tar.gz) = 36869662105f0aa10f294f96777c9be52c4603d3ce69f57713a225f38a975cebf0d4102d520a9378a9c88d5104eff7003b64c72628059f286b4f592dcdfeca20