[arch-commits] Commit in python-boto/repos/community-staging-any (3 files)

Felix Yan felixonmars at archlinux.org
Fri Nov 1 09:00:05 UTC 2019


    Date: Friday, November 1, 2019 @ 09:00:04
  Author: felixonmars
Revision: 521764

archrelease: copy trunk to community-staging-any

Added:
  python-boto/repos/community-staging-any/PKGBUILD
    (from rev 521763, python-boto/trunk/PKGBUILD)
  python-boto/repos/community-staging-any/boto-python-3.8.patch
    (from rev 521763, python-boto/trunk/boto-python-3.8.patch)
Deleted:
  python-boto/repos/community-staging-any/PKGBUILD

-----------------------+
 PKGBUILD              |  120 +++++++++++++++++++++++++-----------------------
 boto-python-3.8.patch |   58 +++++++++++++++++++++++
 2 files changed, 121 insertions(+), 57 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-01 08:59:51 UTC (rev 521763)
+++ PKGBUILD	2019-11-01 09:00:04 UTC (rev 521764)
@@ -1,57 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Kaiting Chen <kaitocracy at gmail.com>
-# Contributor: Aaron Schaefer <aaron at elasticdog.com>
-
-pkgbase=python-boto
-pkgname=(python-boto python2-boto)
-pkgver=2.49.0
-pkgrel=2
-pkgdesc='A Python interface to Amazon Web Services (AWS)'
-arch=('any')
-url='https://github.com/boto/boto'
-license=('MIT')
-makedepends=('python-setuptools' 'python2-setuptools')
-checkdepends=('python-nose' 'python2-nose' 'python-mock' 'python2-mock' 'python-requests'
-              'python2-requests' 'python-httpretty' 'python2-httpretty')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/boto/boto/archive/$pkgver.tar.gz")
-sha512sums=('43c2679f33ecec9b78d9969329d361cff4fd569b431e8451d849a42882ba4913598bfc7e11561fc54799e6e36e6e75a0299da955232435fb3e56745b2fcb57bc')
-
-prepare() {
-  cp -a boto-$pkgver{,-py2}
-
-  cd boto-$pkgver-py2
-  # python2 fix
-  find . -name '*.py' -type f -print0 | xargs -0 \
-    sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_'
-}
-
-check() {
-  cd "$srcdir"/boto-$pkgver
-  python tests/test.py default
-
-  cd "$srcdir"/boto-$pkgver-py2
-  python2 tests/test.py default
-}
-
-package_python-boto() {
-  depends=('python')
-
-  cd boto-$pkgver
-
-  python setup.py install -O1 --root="$pkgdir"
-  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-
-  # Remove (somewhat deprecated) tools that conflicts with the python 2 version.
-  rm -r "$pkgdir"/usr/bin
-}
-
-package_python2-boto() {
-  depends=('python2')
-  conflicts=('python-boto<2.32.1-1')
-  replaces=('python-boto<2.32.1-1')
-
-  cd boto-$pkgver-py2
-
-  python2 setup.py install -O1 --root="$pkgdir"
-  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
-}

Copied: python-boto/repos/community-staging-any/PKGBUILD (from rev 521763, python-boto/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-11-01 09:00:04 UTC (rev 521764)
@@ -0,0 +1,63 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Kaiting Chen <kaitocracy at gmail.com>
+# Contributor: Aaron Schaefer <aaron at elasticdog.com>
+
+pkgbase=python-boto
+pkgname=(python-boto python2-boto)
+pkgver=2.49.0
+pkgrel=3
+pkgdesc='A Python interface to Amazon Web Services (AWS)'
+arch=('any')
+url='https://github.com/boto/boto'
+license=('MIT')
+makedepends=('python-setuptools' 'python2-setuptools')
+checkdepends=('python-nose' 'python2-nose' 'python-mock' 'python2-mock' 'python-requests'
+              'python2-requests' 'python-httpretty' 'python2-httpretty')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/boto/boto/archive/$pkgver.tar.gz"
+         boto-python-3.8.patch)
+sha512sums=('43c2679f33ecec9b78d9969329d361cff4fd569b431e8451d849a42882ba4913598bfc7e11561fc54799e6e36e6e75a0299da955232435fb3e56745b2fcb57bc'
+            '3e32db201adb637d3b6041f9e7be65889f1306042cbed36e4884207cbf772dc8f7691be9a505ec79f111b99c8313e0d42436c1f9a2dfa095de6cc77a7fe4bc6d')
+
+prepare() {
+  (cd boto-$pkgver
+   patch -p1 -i ../boto-python-3.8.patch # Fix escaping with python 3.8
+  )
+
+  cp -a boto-$pkgver{,-py2}
+
+  cd boto-$pkgver-py2
+  # python2 fix
+  find . -name '*.py' -type f -print0 | xargs -0 \
+    sed -i 's_#!/usr/bin/env python_#!/usr/bin/env python2_'
+}
+
+check() {
+  cd "$srcdir"/boto-$pkgver
+  python tests/test.py default
+
+  cd "$srcdir"/boto-$pkgver-py2
+  python2 tests/test.py default
+}
+
+package_python-boto() {
+  depends=('python')
+
+  cd boto-$pkgver
+
+  python setup.py install -O1 --root="$pkgdir"
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+
+  # Remove (somewhat deprecated) tools that conflicts with the python 2 version.
+  rm -r "$pkgdir"/usr/bin
+}
+
+package_python2-boto() {
+  depends=('python2')
+  conflicts=('python-boto<2.32.1-1')
+  replaces=('python-boto<2.32.1-1')
+
+  cd boto-$pkgver-py2
+
+  python2 setup.py install -O1 --root="$pkgdir"
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}

Copied: python-boto/repos/community-staging-any/boto-python-3.8.patch (from rev 521763, python-boto/trunk/boto-python-3.8.patch)
===================================================================
--- boto-python-3.8.patch	                        (rev 0)
+++ boto-python-3.8.patch	2019-11-01 09:00:04 UTC (rev 521764)
@@ -0,0 +1,58 @@
+diff --git a/boto/ecs/item.py b/boto/ecs/item.py
+index 79177a31..a9504e9d 100644
+--- a/boto/ecs/item.py
++++ b/boto/ecs/item.py
+@@ -21,7 +21,11 @@
+ 
+ 
+ import xml.sax
+-import cgi
++try:
++    from html import escape as html_escape
++except ImportError:
++    # Python 2
++    from cgi import escape as html_escape
+ from boto.compat import six, StringIO
+ 
+ class ResponseGroup(xml.sax.ContentHandler):
+@@ -67,7 +71,7 @@ class ResponseGroup(xml.sax.ContentHandler):
+         return None
+ 
+     def endElement(self, name, value, connection):
+-        self._xml.write("%s</%s>" % (cgi.escape(value).replace("&amp;", "&"), name))
++        self._xml.write("%s</%s>" % (html_escape(value).replace("&amp;", "&"), name))
+         if len(self._nodepath) == 0:
+             return
+         obj = None
+diff --git a/tests/unit/utils/test_utils.py b/tests/unit/utils/test_utils.py
+index db15b56d..d2e8dfb3 100644
+--- a/tests/unit/utils/test_utils.py
++++ b/tests/unit/utils/test_utils.py
+@@ -85,7 +85,7 @@ class TestPassword(unittest.TestCase):
+         def hmac_hashfunc(cls, msg):
+             if not isinstance(msg, bytes):
+                 msg = msg.encode('utf-8')
+-            return hmac.new(b'mysecretkey', msg)
++            return hmac.new(b'mysecretkey', msg, digestmod=hashlib.md5)
+ 
+         class HMACPassword(Password):
+             hashfunc = hmac_hashfunc
+@@ -95,15 +95,15 @@ class TestPassword(unittest.TestCase):
+         password.set('foo')
+ 
+         self.assertEquals(str(password),
+-                          hmac.new(b'mysecretkey', b'foo').hexdigest())
++                          hmac.new(b'mysecretkey', b'foo', digestmod=hashlib.md5).hexdigest())
+ 
+     def test_constructor(self):
+-        hmac_hashfunc = lambda msg: hmac.new(b'mysecretkey', msg)
++        hmac_hashfunc = lambda msg: hmac.new(b'mysecretkey', msg, digestmod=hashlib.md5)
+ 
+         password = Password(hashfunc=hmac_hashfunc)
+         password.set('foo')
+         self.assertEquals(password.str,
+-                          hmac.new(b'mysecretkey', b'foo').hexdigest())
++                          hmac.new(b'mysecretkey', b'foo', digestmod=hashlib.md5).hexdigest())
+ 
+ 
+ class TestPythonizeName(unittest.TestCase):



More information about the arch-commits mailing list