diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2021-09-19 20:08:04 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2021-09-19 20:08:04 +0300 |
commit | 429ee757d193dc71ac56b63577f0892eac3fe466 (patch) | |
tree | 17cf47a7e1ffbf60630763180151a5098d93524d | |
parent | sci-physics/yoda: Remove old (diff) | |
download | gentoo-429ee757d193dc71ac56b63577f0892eac3fe466.tar.gz gentoo-429ee757d193dc71ac56b63577f0892eac3fe466.tar.bz2 gentoo-429ee757d193dc71ac56b63577f0892eac3fe466.zip |
dev-python/aws-xray-sdk-python: enable py3.10
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r-- | dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild | 40 | ||||
-rw-r--r-- | dev-python/aws-xray-sdk-python/files/aws-xray-sdk-python-2.8.0-fix-py3.10-loops.patch | 36 |
2 files changed, 55 insertions, 21 deletions
diff --git a/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild b/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild index 560c3e416dac..d07a31c0dce9 100644 --- a/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild +++ b/dev-python/aws-xray-sdk-python/aws-xray-sdk-python-2.8.0.ebuild @@ -2,7 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -PYTHON_COMPAT=( python3_{7..9} ) + +PYTHON_COMPAT=( python3_{8..10} ) inherit distutils-r1 @@ -15,7 +16,6 @@ SRC_URI=" LICENSE="Apache-2.0" SLOT="0" KEYWORDS="amd64 ~arm ~arm64 x86 ~amd64-linux ~x86-linux" -IUSE="" RDEPEND=" >=dev-python/botocore-1.12.122[${PYTHON_USEDEP}] @@ -33,6 +33,10 @@ BDEPEND=" dev-python/webtest[${PYTHON_USEDEP}] )" +PATCHES=( + "${FILESDIR}/${P}-fix-py3.10-loops.patch" +) + distutils_enable_tests pytest python_test() { @@ -40,34 +44,28 @@ python_test() { local -x AWS_SECRET_ACCESS_KEY=fake_key local -x AWS_ACCESS_KEY_ID=fake_id - local args=( - # unpackaged deps - --ignore tests/ext/aiobotocore - --ignore tests/ext/pg8000 - --ignore tests/ext/psycopg2 - --ignore tests/ext/pymysql - --ignore tests/ext/pynamodb - --ignore tests/ext/sqlalchemy_core/test_postgres.py - --deselect tests/ext/django/test_db.py - + local EPYTEST_DESELECT=( # Internet access - --deselect tests/test_patcher.py::test_external_file - --deselect tests/test_patcher.py::test_external_module - --deselect tests/test_patcher.py::test_external_submodules_full - --deselect tests/test_patcher.py::test_external_submodules_ignores_file - --deselect tests/test_patcher.py::test_external_submodules_ignores_module - --deselect tests/ext/aiohttp/test_client.py - --ignore + ) + local EPYTEST_IGNORE=( + # unpackaged deps + tests/ext/aiobotocore + tests/ext/pg8000 + tests/ext/psycopg2 + tests/ext/pymysql + tests/ext/pynamodb + tests/ext/sqlalchemy_core/test_postgres.py + tests/ext/django/test_db.py + # Internet access tests/ext/httplib - --ignore tests/ext/requests ) - epytest -p no:django "${args[@]}" + epytest -p no:django } diff --git a/dev-python/aws-xray-sdk-python/files/aws-xray-sdk-python-2.8.0-fix-py3.10-loops.patch b/dev-python/aws-xray-sdk-python/files/aws-xray-sdk-python-2.8.0-fix-py3.10-loops.patch new file mode 100644 index 000000000000..cde91a8d0cda --- /dev/null +++ b/dev-python/aws-xray-sdk-python/files/aws-xray-sdk-python-2.8.0-fix-py3.10-loops.patch @@ -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]] + |