mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-31 19:31:07 +02:00
dev-python/boto: Sync with Gentoo
It's from gentoo commit 99e8a93d029cb2370fb08397cdb6cd7b459b2353.
This commit is contained in:
parent
a7339931a4
commit
650892196a
@ -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
|
||||
}
|
||||
|
44
sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py310.patch
vendored
Normal file
44
sdk_container/src/third_party/coreos-overlay/dev-python/boto/files/boto-2.49.0-py310.patch
vendored
Normal file
@ -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,
|
Loading…
x
Reference in New Issue
Block a user