From 650892196ad259cb6bbaf60e4a652336c30a15e0 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Mon, 11 Apr 2022 13:55:54 +0200 Subject: [PATCH] dev-python/boto: Sync with Gentoo It's from gentoo commit 99e8a93d029cb2370fb08397cdb6cd7b459b2353. --- .../dev-python/boto/boto-2.49.0-r4.ebuild | 11 ++--- .../boto/files/boto-2.49.0-py310.patch | 44 +++++++++++++++++++ 2 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py310.patch diff --git a/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r4.ebuild b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r4.ebuild index 00a2041688..5e32f2f4e2 100644 --- a/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r4.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/boto-2.49.0-r4.ebuild @@ -3,7 +3,7 @@ EAPI="7" -PYTHON_COMPAT=( python3_{7..9} ) +PYTHON_COMPAT=( python3_{8..10} ) DISTUTILS_USE_SETUPTOOLS=bdepend inherit distutils-r1 @@ -14,7 +14,7 @@ SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz" LICENSE="MIT" SLOT="0" -KEYWORDS="amd64 arm arm64 ppc ~ppc64 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" +KEYWORDS="amd64 arm arm64 ppc ~ppc64 ~riscv sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos" PATCHES=( # taken from https://bugs.debian.org/909545 @@ -24,6 +24,7 @@ PATCHES=( "${FILESDIR}"/${P}-py3-httplib-strict.patch "${FILESDIR}"/${P}-py3-server-port.patch "${FILESDIR}"/${P}-unbundle-six.patch + "${FILESDIR}"/${P}-py310.patch ) RDEPEND=">=dev-python/six-1.12.0[${PYTHON_USEDEP}]" @@ -50,12 +51,6 @@ src_prepare() { # fix tests mkdir -p "${HOME}"/.ssh || die : > "${HOME}"/.ssh/known_hosts || die - # Flatcar: Do not import boto only for the version number in - # setup.py - it ends up trying to import six, which we have - # unbundled and the six module effectively becomes a BDEPEND - # instead of RDEPEND. Drop the import and define the - # __variable__ instead. - sed -i -e 's/^from boto import __version__$/__version__ = '"'${PV}'"'/' setup.py distutils-r1_src_prepare } diff --git a/sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py310.patch b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py310.patch new file mode 100644 index 0000000000..7b427f1f15 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py310.patch @@ -0,0 +1,44 @@ +diff --git a/boto/dynamodb/types.py b/boto/dynamodb/types.py +index d9aaaa4c..3f8d8601 100644 +--- a/boto/dynamodb/types.py ++++ b/boto/dynamodb/types.py +@@ -27,7 +27,7 @@ Python types and vice-versa. + import base64 + from decimal import (Decimal, DecimalException, Context, + Clamped, Overflow, Inexact, Underflow, Rounded) +-from collections import Mapping ++from collections.abc import Mapping + from boto.dynamodb.exceptions import DynamoDBNumberError + from boto.compat import filter, map, six, long_type + +diff --git a/boto/mws/connection.py b/boto/mws/connection.py +index 687fae74..3a1f5f80 100644 +--- a/boto/mws/connection.py ++++ b/boto/mws/connection.py +@@ -21,7 +21,7 @@ + import xml.sax + import hashlib + import string +-import collections ++import collections.abc + from boto.connection import AWSQueryConnection + from boto.exception import BotoServerError + import boto.mws.exception +@@ -109,7 +109,7 @@ def http_body(field): + def destructure_object(value, into, prefix, members=False): + if isinstance(value, boto.mws.response.ResponseElement): + destructure_object(value.__dict__, into, prefix, members=members) +- elif isinstance(value, collections.Mapping): ++ elif isinstance(value, collections.abc.Mapping): + for name in value: + if name.startswith('_'): + continue +@@ -117,7 +117,7 @@ def destructure_object(value, into, prefix, members=False): + members=members) + elif isinstance(value, six.string_types): + into[prefix] = value +- elif isinstance(value, collections.Iterable): ++ elif isinstance(value, collections.abc.Iterable): + for index, element in enumerate(value): + suffix = (members and '.member.' or '.') + str(index + 1) + destructure_object(element, into, prefix + suffix,