Date: Wednesday, December 8, 2021 @ 03:38:23 Author: yan12125 Revision: 1065598
python-aws-xray-sdk: fix for Python 3.10 And re-enable sqlalchemy tests now that community/python-sqlalchemy is updated Added: python-aws-xray-sdk/trunk/python310.diff Modified: python-aws-xray-sdk/trunk/PKGBUILD ----------------+ PKGBUILD | 13 +++++++------ python310.diff | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 6 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2021-12-08 03:23:18 UTC (rev 1065597) +++ PKGBUILD 2021-12-08 03:38:23 UTC (rev 1065598) @@ -18,8 +18,10 @@ python-pg8000 python-requests python-aiobotocore python-bottle python-webtest python-django-fake-model python-mock python-sqlalchemy) # 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=('3f94ee35d8e34022939153dcc6d5bd8bce1428ee4811f0ee4713e40dae8b22dd') +source=("https://github.com/aws/aws-xray-sdk-python/archive/$pkgver/$pkgname-$pkgver.tar.gz" + "python310.diff") +sha256sums=('3f94ee35d8e34022939153dcc6d5bd8bce1428ee4811f0ee4713e40dae8b22dd' + '11784ed0d9b9f89bf1cc43a6d97d8488672b74e3419e121be1a50f09e409ad71') prepare() { cd $_pkgname-$pkgver @@ -32,6 +34,8 @@ # https://github.com/aio-libs/aiobotocore/releases/tag/2.0.0 sed -i -e "s/import aiobotocore$/import aiobotocore.session/g" \ -e "s/aiobotocore\.get_session/aiobotocore.session.get_session/g" tests/ext/aiobotocore/test_aiobotocore.py + + patch -Np1 -i ../python310.diff } build() { @@ -50,10 +54,7 @@ # the test suite for pymysql uses testing.mysqld, which is not # compatible with MariaDB # https://github.com/tk0miya/testing.mysqld/issues/3 - # Tests in test_sqlalchemy_core_2.py need sqlalchemy >= 1.4 [1] - # https://github.com/aws/aws-xray-sdk-python/pull/289 - pytest -v tests --ignore tests/ext/pymysql \ - --ignore tests/ext/sqlalchemy_core/test_sqlalchemy_core_2.py + pytest -v tests --ignore tests/ext/pymysql } package() { Added: python310.diff =================================================================== --- python310.diff (rev 0) +++ python310.diff 2021-12-08 03:38:23 UTC (rev 1065598) @@ -0,0 +1,36 @@ +diff --git a/tests/ext/aiohttp/test_middleware.py b/tests/ext/aiohttp/test_middleware.py +index c8b2333..4f8cac6 100644 +--- a/tests/ext/aiohttp/test_middleware.py ++++ b/tests/ext/aiohttp/test_middleware.py +@@ -279,8 +279,7 @@ async def test_concurrent(test_client, loop, recorder): + + await asyncio.wait([get_delay(), get_delay(), get_delay(), + get_delay(), get_delay(), get_delay(), +- get_delay(), get_delay(), get_delay()], +- loop=loop) ++ get_delay(), get_delay(), get_delay()]) + + # Ensure all ID's are different + ids = [item.id for item in recorder.emitter.local] +diff --git a/tests/test_async_local_storage.py b/tests/test_async_local_storage.py +index b43cc0e..4b13ffd 100644 +--- a/tests/test_async_local_storage.py ++++ b/tests/test_async_local_storage.py +@@ -19,7 +19,7 @@ def test_localstorage_isolation(loop): + random_int = random.random() + local_storage.randint = random_int + +- await asyncio.sleep(0.0, loop=loop) ++ await asyncio.sleep(0.0) + + current_random_int = local_storage.randint + assert random_int == current_random_int +@@ -30,7 +30,7 @@ def test_localstorage_isolation(loop): + + # Run loads of concurrent tasks + results = loop.run_until_complete( +- asyncio.wait([_test() for _ in range(0, 100)], loop=loop) ++ asyncio.wait([_test() for _ in range(0, 100)]) + ) + results = [item.result() for item in results[0]] +