diff options
| author | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2024-04-18 20:37:30 +0000 |
|---|---|---|
| committer | Liguros - Gitlab CI/CD [develop] <gitlab@liguros.net> | 2024-04-18 20:37:30 +0000 |
| commit | e6d18a8f1681472d89ca4e2756683c070f926360 (patch) | |
| tree | a1546ccac54784bf02dd111736c9e42cce7c8959 /dev-python/autobahn | |
| parent | 39bd2375187ef340ddb42db0a58d2acc9396d75e (diff) | |
| download | baldeagleos-repo-e6d18a8f1681472d89ca4e2756683c070f926360.tar.gz baldeagleos-repo-e6d18a8f1681472d89ca4e2756683c070f926360.tar.xz baldeagleos-repo-e6d18a8f1681472d89ca4e2756683c070f926360.zip | |
Adding metadata
Diffstat (limited to 'dev-python/autobahn')
| -rw-r--r-- | dev-python/autobahn/autobahn-23.6.2.ebuild | 13 | ||||
| -rw-r--r-- | dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch | 42 |
2 files changed, 52 insertions, 3 deletions
diff --git a/dev-python/autobahn/autobahn-23.6.2.ebuild b/dev-python/autobahn/autobahn-23.6.2.ebuild index 5300f523950d..949736bdf886 100644 --- a/dev-python/autobahn/autobahn-23.6.2.ebuild +++ b/dev-python/autobahn/autobahn-23.6.2.ebuild @@ -11,13 +11,12 @@ inherit distutils-r1 optfeature pypi DESCRIPTION="WebSocket and WAMP for Twisted and Asyncio" HOMEPAGE=" - https://crossbar.io/autobahn/ https://github.com/crossbario/autobahn-python/ https://pypi.org/project/autobahn/ " -SLOT="0" LICENSE="MIT" +SLOT="0" KEYWORDS="amd64 arm arm64 ~riscv ~sparc x86" IUSE="test xbr" RESTRICT="!test? ( test )" @@ -58,6 +57,11 @@ BDEPEND=" " python_prepare_all() { + local PATCHES=( + # https://github.com/crossbario/autobahn-python/pull/1634 + "${FILESDIR}/${P}-pytest-asyncio.patch" + ) + if use xbr ; then eerror "***************" eerror "Required xbr dependencies are incomplete in Gentoo." @@ -89,8 +93,11 @@ python_test() { unset USE_TWISTED einfo "RE-testing cryptosign and component_aio using asyncio" + local -x PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 local -x USE_ASYNCIO=true - epytest --pyargs autobahn.wamp.test.test_wamp_{cryptosign,component_aio} + epytest -p asyncio --pyargs \ + autobahn.asyncio.test.test_aio_{raw,web}socket \ + autobahn.wamp.test.test_wamp_{cryptosign,component_aio} unset USE_ASYNCIO rm -f twisted/plugins/dropin.cache || die diff --git a/dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch b/dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch new file mode 100644 index 000000000000..2cdbd863231b --- /dev/null +++ b/dev-python/autobahn/files/autobahn-23.6.2-pytest-asyncio.patch @@ -0,0 +1,42 @@ +From 5ab94618723c488df640ae0777ac5a16ee1ab369 Mon Sep 17 00:00:00 2001 +From: David Hotham <david.hotham@microsoft.com> +Date: Sat, 13 Apr 2024 05:27:01 +0100 +Subject: [PATCH] unit test fixes (#1634) + +--- + autobahn/wamp/test/test_wamp_component_aio.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/autobahn/wamp/test/test_wamp_component_aio.py b/autobahn/wamp/test/test_wamp_component_aio.py +index 168933ea5..2de9bf358 100644 +--- a/autobahn/wamp/test/test_wamp_component_aio.py ++++ b/autobahn/wamp/test/test_wamp_component_aio.py +@@ -35,7 +35,7 @@ + + @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+") + @pytest.mark.asyncio(forbid_global_loop=True) +- def test_asyncio_component(event_loop): ++ async def test_asyncio_component(event_loop): + orig_loop = txaio.config.loop + txaio.config.loop = event_loop + +@@ -72,11 +72,11 @@ def done(f): + txaio.config.loop = orig_loop + assert comp._done_f is None + f.add_done_callback(done) +- return finished ++ await finished + + @pytest.mark.skipif(sys.version_info < (3, 5), reason="requires Python 3.5+") + @pytest.mark.asyncio(forbid_global_loop=True) +- def test_asyncio_component_404(event_loop): ++ async def test_asyncio_component_404(event_loop): + """ + If something connects but then gets aborted, it should still try + to re-connect (in real cases this could be e.g. wrong path, +@@ -151,4 +151,4 @@ def done(f): + finished.set_result(None) + txaio.config.loop = orig_loop + f.add_done_callback(done) +- return finished ++ await finished |
