From a9d337826eec0fad2b01fd6f38774f54e110fe89 Mon Sep 17 00:00:00 2001 From: Karolina Surma Date: Tue, 4 Jul 2023 10:33:08 +0200 Subject: [PATCH] Fix test failures with Python 3.12 --- Fix-test-failures-with-Python-3.12.patch | 39 ++++++++++++++++++++++++ python-botocore.spec | 9 +++++- 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 Fix-test-failures-with-Python-3.12.patch diff --git a/Fix-test-failures-with-Python-3.12.patch b/Fix-test-failures-with-Python-3.12.patch new file mode 100644 index 0000000..8605a9b --- /dev/null +++ b/Fix-test-failures-with-Python-3.12.patch @@ -0,0 +1,39 @@ +From 66acf7567a00559c42663f0b68ea9a802f2cbe0e Mon Sep 17 00:00:00 2001 +From: Karolina Surma +Date: Tue, 4 Jul 2023 10:03:31 +0200 +Subject: [PATCH] Fix test failures with Python 3.12 + +--- + tests/unit/test_client.py | 2 +- + tests/unit/test_utils.py | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/unit/test_client.py b/tests/unit/test_client.py +index eb7a307..6bc2f16 100644 +--- a/tests/unit/test_client.py ++++ b/tests/unit/test_client.py +@@ -1229,7 +1229,7 @@ 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.' +diff --git a/tests/unit/test_utils.py b/tests/unit/test_utils.py +index 6b1a33b..277caf1 100644 +--- a/tests/unit/test_utils.py ++++ b/tests/unit/test_utils.py +@@ -1124,7 +1124,7 @@ class TestSwitchToChunkedEncodingForNonSeekableObjects(unittest.TestCase): + 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() +-- +2.41.0 + diff --git a/python-botocore.spec b/python-botocore.spec index 0a6c710..42f69c2 100644 --- a/python-botocore.spec +++ b/python-botocore.spec @@ -4,12 +4,16 @@ Name: python-%{pypi_name} # NOTICE - Updating this package requires updating python-boto3 Version: 1.29.164 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Low-level, data-driven core of boto 3 License: Apache-2.0 URL: https://github.com/boto/botocore Source0: %{pypi_source} + +# Reported upstream: https://github.com/boto/botocore/issues/2979 +Patch: Fix-test-failures-with-Python-3.12.patch + BuildArch: noarch %global _description %{expand: @@ -62,6 +66,9 @@ rm -vr tests/functional/leak %license LICENSE.txt %changelog +* Tue Jul 04 2023 Karolina Surma - 1.29.164-2 +- Fix test failures with Python 3.12 + * Fri Jun 30 2023 Gwyn Ciesla - 1.29.164-1 - 1.29.164