[arch-commits] Commit in python-aws-xray-sdk/trunk (PKGBUILD aiobotocore-0.12.patch)

Chih-Hsuan Yen yan12125 at archlinux.org
Sat Feb 29 03:17:08 UTC 2020


    Date: Saturday, February 29, 2020 @ 03:17:07
  Author: yan12125
Revision: 586737

python-aws-xray-sdk: add a patch for aiobotocore 0.12

The commit is from https://github.com/aws/aws-xray-sdk-python/pull/205

Added:
  python-aws-xray-sdk/trunk/aiobotocore-0.12.patch
Modified:
  python-aws-xray-sdk/trunk/PKGBUILD

------------------------+
 PKGBUILD               |   13 ++++++--
 aiobotocore-0.12.patch |   69 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-02-29 03:13:16 UTC (rev 586736)
+++ PKGBUILD	2020-02-29 03:17:07 UTC (rev 586737)
@@ -4,7 +4,7 @@
 pkgname=python-aws-xray-sdk
 _pkgname=aws-xray-sdk-python
 pkgver=2.4.3
-pkgrel=1
+pkgrel=2
 pkgdesc='AWS X-Ray SDK for Python'
 arch=(any)
 url='https://github.com/aws/aws-xray-sdk-python'
@@ -15,9 +15,16 @@
               python-pytest-aiohttp python-testing.postgresql python-psycopg2
               python-pg8000 python-requests python-aiobotocore)
 # Not using PyPI source tarball as it does not include tests
-source=("https://github.com/aws/aws-xray-sdk-python/archive/$pkgver/$pkgname-$pkgver.tar.gz")
-sha256sums=('adb528c7c092293613484ca28c5466c79889ff6035493681daf9fbde9ba95b3a')
+source=("https://github.com/aws/aws-xray-sdk-python/archive/$pkgver/$pkgname-$pkgver.tar.gz"
+        aiobotocore-0.12.patch)
+sha256sums=('adb528c7c092293613484ca28c5466c79889ff6035493681daf9fbde9ba95b3a'
+            '20d99cfbf6675f2b2d8147b5e4bc218de5666b0c0629d3fea8fb9a39b66c4d8b')
 
+prepare() {
+  cd $_pkgname-$pkgver
+  patch -Np1 -i ../aiobotocore-0.12.patch
+}
+
 build() {
   cd $_pkgname-$pkgver
   python setup.py build

Added: aiobotocore-0.12.patch
===================================================================
--- aiobotocore-0.12.patch	                        (rev 0)
+++ aiobotocore-0.12.patch	2020-02-29 03:17:07 UTC (rev 586737)
@@ -0,0 +1,69 @@
+From 3f2ba2d4b6973ea7234f82154ebcaf4b8d53cc99 Mon Sep 17 00:00:00 2001
+From: Prashant Srivastava <srprash at amazon.com>
+Date: Tue, 25 Feb 2020 14:27:29 -0800
+Subject: [PATCH] Dropping loop parameter from aiobotocore.get_session() due to
+ new aiobotocore 0.12.0 changes
+
+---
+ tests/ext/aiobotocore/test_aiobotocore.py | 12 ++++++------
+ tox.ini                                   |  3 ++-
+ 2 files changed, 8 insertions(+), 7 deletions(-)
+
+diff --git a/tests/ext/aiobotocore/test_aiobotocore.py b/tests/ext/aiobotocore/test_aiobotocore.py
+index 6b14ea5..4389c8f 100644
+--- a/tests/ext/aiobotocore/test_aiobotocore.py
++++ b/tests/ext/aiobotocore/test_aiobotocore.py
+@@ -28,7 +28,7 @@ def recorder(loop):
+     req_id = '1234'
+     response = {'ResponseMetadata': {'RequestId': req_id, 'HTTPStatusCode': 403}}
+ 
+-    session = aiobotocore.get_session(loop=loop)
++    session = aiobotocore.get_session()
+     async with session.create_client('dynamodb', region_name='eu-west-2') as client:
+         with Stubber(client) as stubber:
+             stubber.add_response('describe_table', response, {'TableName': 'mytable'})
+@@ -53,7 +53,7 @@ def recorder(loop):
+     version_id = 'myversionid'
+     response = {'ResponseMetadata': {'RequestId': '1234', 'HTTPStatusCode': 200}}
+ 
+-    session = aiobotocore.get_session(loop=loop)
++    session = aiobotocore.get_session()
+     async with session.create_client('s3', region_name='eu-west-2') as client:
+         with Stubber(client) as stubber:
+             stubber.add_response('get_object', response,
+@@ -87,7 +87,7 @@ def recorder(loop):
+         }
+     }
+ 
+-    session = aiobotocore.get_session(loop=loop)
++    session = aiobotocore.get_session()
+     async with session.create_client('sqs', region_name='eu-west-2') as client:
+         with Stubber(client) as stubber:
+             stubber.add_response('list_queues', response, {'QueueNamePrefix': queue_name_prefix})
+@@ -117,7 +117,7 @@ def recorder(loop):
+         }
+     }
+ 
+-    session = aiobotocore.get_session(loop=loop)
++    session = aiobotocore.get_session()
+     async with session.create_client('dynamodb', region_name='eu-west-2') as client:
+         with Stubber(client) as stubber:
+             stubber.add_response('batch_write_item', response, {'RequestItems': ANY})
+@@ -137,7 +137,7 @@ def recorder(loop):
+ 
+     response = {'ResponseMetadata': {'RequestId': '1234', 'HTTPStatusCode': 403}}
+ 
+-    session = aiobotocore.get_session(loop=loop)
++    session = aiobotocore.get_session()
+     async with session.create_client('dynamodb', region_name='eu-west-2') as client:
+         with Stubber(client) as stubber:
+             stubber.add_response('describe_table', response, {'TableName': 'mytable'})
+@@ -150,7 +150,7 @@ def recorder(loop):
+     xray_recorder.configure(service='test', sampling=False,
+                             context=AsyncContext(loop=loop), context_missing='LOG_ERROR')
+ 
+-    session = aiobotocore.get_session(loop=loop)
++    session = aiobotocore.get_session()
+     async with session.create_client('dynamodb', region_name='eu-west-2') as client:
+         with Stubber(client) as stubber:
+             stubber.add_client_error('describe_table', expected_params={'TableName': ANY})



More information about the arch-commits mailing list