python3-uvloop: import 0.22.1 from meta-homeassistant
PATCH 1/5 python3-uvloop: import 0.22.1 from meta-homeassistant
From: Tim Orling <[email protected]>
uvloop is an asyncio event loop built on libuv. The python3-websockets test suite exercises it, so bring it into oe-core.
Changes from the meta-homeassistant recipe:
* Build against the oe-core libuv recipe through setup.cfg, instead of patching setup.py; drop the Cython pin relaxation, since ~=3.1 already allows Cython 3.2.
* LICENSE is "Apache-2.0 OR MIT" (dual-licensed upstream), and the vendored libuv licenses are dropped since it is not built.
* Drop aiohttp, psutil and pyopenssl from RDEPENDS; they are only test dependencies. Add python3-asyncio.
* Move the maintainer entry to maintainers.inc.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
--- meta/conf/distro/include/maintainers.inc | 1 + .../0001-setup.cfg-use-system-libuv.patch | 21 +++++++++++++++++++ .../python/python3-uvloop_0.22.1.bb | 17 +++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-uvloop/0001-setup.cfg-use-system-libuv.patch create mode 100644 meta/recipes-devtools/python/python3-uvloop_0.22.1.bb
meta/conf/distro/include/maintainers.inc +1 -0
@@ -750,6 +750,7 @@ RECIPE_MAINTAINER:pn-python3-unittest-automake-output = "Ross Burton <ross.burto RECIPE_MAINTAINER:pn-python3-uritools = "Marta Rybczynska <[email protected]>" RECIPE_MAINTAINER:pn-python3-urllib3 = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-uv-build = "Trevor Gamblin <[email protected]>" +RECIPE_MAINTAINER:pn-python3-uvloop = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-vcs-versioning = "Trevor Gamblin <[email protected]>" RECIPE_MAINTAINER:pn-python3-vcversioner = "Bruce Ashfield <[email protected]>" RECIPE_MAINTAINER:pn-python3-wcwidth = "Tim Orling <[email protected]>"
meta/recipes-devtools/python/python3-uvloop/0001-setup.cfg-use-system-libuv.patch new file +21 -0
@@ -0,0 +1,21 @@ +From: Tim Orling <[email protected]> +Subject: [PATCH] setup.cfg: use system libuv + +Build against the libuv recipe instead of the bundled copy in +vendor/libuv. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Tim Orling <[email protected]> +--- + setup.cfg | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,3 +1,6 @@ ++[build_ext] ++use_system_libuv = 1 ++ + [egg_info] + tag_build = + tag_date = 0
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb new file +17 -0
@@ -0,0 +1,17 @@ +SUMMARY = "Fast implementation of asyncio event loop on top of libuv" +HOMEPAGE = "https://github.com/MagicStack/uvloop" +BUGTRACKER = "https://github.com/MagicStack/uvloop/issues" +LICENSE = "Apache-2.0 OR MIT" +LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ + file://LICENSE-MIT;md5=489c8bc34154e4b59f5c58e664f7d70f" + +DEPENDS += "libuv python3-wheel-native" + +SRC_URI += "file://0001-setup.cfg-use-system-libuv.patch" +SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" + +inherit pypi python_setuptools_build_meta cython + +RDEPENDS:${PN} = "python3-asyncio" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.47.3
PATCH 2/5 python3-uvloop: enable ptest
From: Tim Orling <[email protected]>
The sdist ships the test suite. run-ptest deselects:
* tests that conflict with pytest's output capture;
* tests broken by libuv 1.53.0 spawning with posix_spawn() on Linux, which bypasses uvloop's preexec_fn fork hook;
* DNS tests that wait for resolver timeouts without network access, which took the suite from 1 to 10 minutes over tap without NAT.
.flake8 and mypy.ini let test_sourcecode skip cleanly when flake8 and mypy are missing.
Tested with core-image-ptest-python3-uvloop on qemux86-64 (kvm, tap):
455 passed, 35 skipped, 0 failed in 82s, so add it to PTESTS_SLOW.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
--- .../distro/include/ptest-packagelists.inc | 1 + .../python/python3-uvloop/run-ptest | 25 +++++++++++++++++ .../python/python3-uvloop_0.22.1.bb | 27 +++++++++++++++++-- 3 files changed, 51 insertions(+), 2 deletions(-) create mode 100755 meta/recipes-devtools/python/python3-uvloop/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -154,6 +154,7 @@ PTESTS_SLOW = "\ python3-click \ python3-cryptography \ python3-numpy \ + python3-uvloop \ python3-xmltodict \ strace \ tar \
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +25 -0
@@ -0,0 +1,25 @@ +#!/bin/sh +# test_process_streams_redirect: replaces the stdout/stderr fds, which +# conflicts with pytest's output capture. +# test_process_preexec_fn_{1,2}, Test_UV_DNS test_getaddrinfo_{8,9}: libuv +# 1.53.0 spawns with posix_spawn(), so preexec_fn never runs, and an empty +# host gives EAI_NODATA. +# test_getaddrinfo_{1,2,3,5,6,11}, Test_AIO_DNS test_getaddrinfo_{8,9}: each +# DNS lookup waits for the resolver timeout without network access. +# --deselect matches a node id prefix, so -k handles 1, 2 and 11. +pytest --automake \ + -k "not (test_getaddrinfo_1 or test_getaddrinfo_2) or test_getaddrinfo_10 or test_getaddrinfo_12 or test_getaddrinfo_13 or test_getaddrinfo_14 or test_getaddrinfo_15 or test_getaddrinfo_16 or test_getaddrinfo_17 or test_getaddrinfo_18 or test_getaddrinfo_19 or test_getaddrinfo_20 or test_getaddrinfo_21 or test_getaddrinfo_22" \ + --deselect=tests/test_process.py::Test_UV_Process::test_process_streams_redirect \ + --deselect=tests/test_process.py::Test_AIO_Process::test_process_streams_redirect \ + --deselect=tests/test_process.py::Test_UV_Process::test_process_preexec_fn_1 \ + --deselect=tests/test_process.py::Test_UV_Process::test_process_preexec_fn_2 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_3 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_5 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_6 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_8 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_9 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_3 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_5 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_6 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_8 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_9
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +25 -2
@@ -7,11 +7,34 @@ LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ DEPENDS += "libuv python3-wheel-native" -SRC_URI += "file://0001-setup.cfg-use-system-libuv.patch" +SRC_URI += "\ + file://0001-setup.cfg-use-system-libuv.patch \ + file://run-ptest \ +" SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" -inherit pypi python_setuptools_build_meta cython +inherit pypi python_setuptools_build_meta cython ptest-python-pytest RDEPENDS:${PN} = "python3-asyncio" +RDEPENDS:${PN}-ptest += "\ + python3-ctypes \ + python3-io \ + python3-logging \ + python3-math \ + python3-multiprocessing \ + python3-netclient \ + python3-numbers \ + python3-pickle \ + python3-pprint \ + python3-psutil \ + python3-pyopenssl \ + python3-threading \ +" + +do_install_ptest:append() { + # test_sourcecode needs these to skip cleanly when flake8 and mypy are missing + install -m 0644 ${S}/.flake8 ${S}/mypy.ini ${D}${PTEST_PATH}/ +} + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.47.3
Patchtest results for [PATCH 2/5] python3-uvloop: enable ptest
Thank you for your submission. Patchtest identified one or more issues with the patch. Please see the log below for more information:
---
Testing patch /home/patchtest/share/mboxes/2-5-python3-uvloop-enable-ptest.patch
FAIL: test max line length: Patch line too long (current length 333, maximum is 200) (test_metadata.TestMetadata.test_max_line_length)
PASS: test Signed-off-by presence (test_mbox.TestMbox.test_signed_off_by_presence)
PASS: test auh changelog truncation notice (test_mbox.TestMbox.test_auh_changelog_truncation_notice)
PASS: test author valid (test_mbox.TestMbox.test_author_valid)
PASS: test commit message presence (test_mbox.TestMbox.test_commit_message_presence)
PASS: test commit message user tags (test_mbox.TestMbox.test_commit_message_user_tags)
PASS: test mbox format (test_mbox.TestMbox.test_mbox_format)
PASS: test non-AUH upgrade (test_mbox.TestMbox.test_non_auh_upgrade)
PASS: test shortlog format (test_mbox.TestMbox.test_shortlog_format)
PASS: test shortlog length (test_mbox.TestMbox.test_shortlog_length)
PASS: test target mailing list (test_mbox.TestMbox.test_target_mailing_list)
SKIP: pretest pylint: No python related patches, skipping test (test_python_pylint.PyLint.pretest_pylint)
SKIP: pretest src uri left files: Patch cannot be merged (test_metadata.TestMetadata.pretest_src_uri_left_files)
SKIP: test CVE check ignore: No modified recipes or older target branch, skipping test (test_metadata.TestMetadata.test_cve_check_ignore)
SKIP: test CVE tag format: No new source patches introduced (test_patch.TestPatch.test_cve_tag_format)
SKIP: test Signed-off-by presence: No new source patches introduced (test_patch.TestPatch.test_signed_off_by_presence)
SKIP: test Upstream-Status presence: No new source patches introduced (test_patch.TestPatch.test_upstream_status_presence_format)
SKIP: test bugzilla entry format: No bug ID found (test_mbox.TestMbox.test_bugzilla_entry_format)
SKIP: test lic files chksum modified not mentioned: No modified recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_modified_not_mentioned)
SKIP: test lic files chksum presence: No added recipes, skipping test (test_metadata.TestMetadata.test_lic_files_chksum_presence)
SKIP: test license presence: No added recipes, skipping test (test_metadata.TestMetadata.test_license_presence)
SKIP: test pylint: No python related patches, skipping test (test_python_pylint.PyLint.test_pylint)
SKIP: test series merge on head: Merge test is disabled for now (test_mbox.TestMbox.test_series_merge_on_head)
SKIP: test src uri left files: Patch cannot be merged (test_metadata.TestMetadata.test_src_uri_left_files)
SKIP: test summary presence: No added recipes, skipping test (test_metadata.TestMetadata.test_summary_presence)
---
Please address the issues identified and
submit a new revision of the patch, or alternatively, reply to this email with an explanation of why the patch should be accepted. If you believe these results are due to an error in patchtest, please submit a bug at https://bugzilla.yoctoproject.org/ (use the 'Patchtest' category under 'Yocto Project Subprojects'). For more information on specific failures, see: https://wiki.yoctoproject.org/wiki/Patchtest. Thank you!
Re: [OE-core] [PATCH 2/5] python3-uvloop: enable ptest
In reply to [email protected]Quoted 12 lines · Tim Orling via openembedded-core
From: Tim Orling <[email protected]>
The sdist ships the test suite. run-ptest deselects:
* tests that conflict with pytest's output capture;
* tests broken by libuv 1.53.0 spawning withposix_spawn()on Linux, which bypasses uvloop'spreexec_fnfork hook;
* DNS tests that wait for resolver timeouts without network access, which took the suite from 1 to 10 minutes over tap without NAT..flake8 and mypy.ini let
test_sourcecodeskip cleanly when flake8 and mypy are missing.
Quoted 6 lines
Tested with core-image-ptest-python3-uvloop on qemux86-64 (kvm, tap):
455 passed, 35 skipped, 0 failed in 82s, so add it toPTESTS_SLOW.AI-Generated: Uses Claude Code (Claude Opus 5.5)
Signed-off-by Tim Orling <[email protected]>---
Hi Tim,
Thanks for your patch.
I can see it tends to fail on riscv.
First build:
Failed ptests:
{'python3-uvloop': ['tests/test_regr1.py:TestIssue39Regr.test_issue39_regression',
'tests/test_tcp.py:Test_UV_TCPSSL.test_create_connection_ssl_1',
'tests/test_tcp.py:Test_UV_TCPSSL.test_create_server_ssl_over_ssl',
'tests/test_tcp.py:Test_UV_TCPSSL.test_renegotiation',
'tests/test_tcp.py:Test_AIO_TCPSSL.test_create_connection_ssl_1',
'tests/test_unix.py:Test_UV_UnixSSL.test_create_unix_connection_ssl_1',
'tests/test_unix.py:Test_AIO_UnixSSL.test_create_unix_connection_ssl_1',
'tests/test_unix.py:Test_AIO_UnixSSL.test_create_unix_server_ssl_1']}https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2713
Second build:
Failed ptests:
{'python3-uvloop': ['tests/test_regr1.py:TestIssue39Regr.test_issue39_regression']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2714
This is riscv, so emulation is slower than for other architectures. Maybe we need to relax a bit some timings.
Thanks,
Mathieu
Signature · 3 lines
Mathieu Dubois-Briand, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Re: [OE-core] [PATCH 2/5] python3-uvloop: enable ptest
I have a v2 in testing which drops 8 time sensitive tests on qemuriscv64. I'll double check the skips against your list of failures before I send.
Quoted 74 lines · On Mon, Nov 2, 2026 at 06:10 Mathieu Dubois-Briand via openembedded-core…
Quoted 12 lines · Tim Orling via openembedded-core
From: Tim Orling <[email protected]>
The sdist ships the test suite. run-ptest deselects:
* tests that conflict with pytest's output capture;
* tests broken by libuv 1.53.0 spawning withposix_spawn()on Linux, which bypasses uvloop'spreexec_fnfork hook;
* DNS tests that wait for resolver timeouts without network access, which took the suite from 1 to 10 minutes over tap without NAT..flake8 and mypy.ini let
test_sourcecodeskip cleanly when flake8 and mypy are missing.Quoted 6 lines
Tested with core-image-ptest-python3-uvloop on qemux86-64 (kvm, tap):
455 passed, 35 skipped, 0 failed in 82s, so add it toPTESTS_SLOW.AI-Generated: Uses Claude Code (Claude Opus 5.5)
Signed-off-by Tim Orling <[email protected]>---
Hi Tim,
Thanks for your patch.
I can see it tends to fail on riscv.
First build:
Failed ptests:
{'python3-uvloop':
['tests/test_regr1.py:TestIssue39Regr.test_issue39_regression','tests/test_tcp.py:Test_UV_TCPSSL.test_create_connection_ssl_1',
'tests/test_tcp.py:Test_UV_TCPSSL.test_create_server_ssl_over_ssl',
'tests/test_tcp.py:Test_UV_TCPSSL.test_renegotiation','tests/test_tcp.py:Test_AIO_TCPSSL.test_create_connection_ssl_1',
'tests/test_unix.py:Test_UV_UnixSSL.test_create_unix_connection_ssl_1',
'tests/test_unix.py:Test_AIO_UnixSSL.test_create_unix_connection_ssl_1',
'tests/test_unix.py:Test_AIO_UnixSSL.test_create_unix_server_ssl_1']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2713Second build:
Failed ptests:
{'python3-uvloop':
['tests/test_regr1.py:TestIssue39Regr.test_issue39_regression']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2714This is riscv, so emulation is slower than for other architectures. Maybe we need to relax a bit some timings.
Thanks,
Mathieu--
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#249211):
https://lists.openembedded.org/g/openembedded-core/message/249211
Mute This Topic: https://lists.openembedded.org/mt/122051652/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 2/5] python3-uvloop: enable ptest
In reply to Mathieu Dubois-BriandHello, Tim and Mathieu
On 11/2/26 3:10 PM, Mathieu Dubois-Briand via openembedded-core wrote:
(...)
Quoted 20 lines
I can see it tends to fail on riscv.
First build:
Failed ptests:
{'python3-uvloop': ['tests/test_regr1.py:TestIssue39Regr.test_issue39_regression','tests/test_tcp.py:Test_UV_TCPSSL.test_create_connection_ssl_1', 'tests/test_tcp.py:Test_UV_TCPSSL.test_create_server_ssl_over_ssl', 'tests/test_tcp.py:Test_UV_TCPSSL.test_renegotiation', 'tests/test_tcp.py:Test_AIO_TCPSSL.test_create_connection_ssl_1', 'tests/test_unix.py:Test_UV_UnixSSL.test_create_unix_connection_ssl_1', 'tests/test_unix.py:Test_AIO_UnixSSL.test_create_unix_connection_ssl_1', 'tests/test_unix.py:Test_AIO_UnixSSL.test_create_unix_server_ssl_1']}https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2713
Second build:
Failed ptests:
{'python3-uvloop': ['tests/test_regr1.py:TestIssue39Regr.test_issue39_regression']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2714
Quoted 5 lines
This is riscv, so emulation is slower than for other architectures. Maybe we need to relax a bit some timings.
Thanks,
Mathieu
FYI, there was another failure on RISC-V related to another patch in this series:
Failed ptests:
{'python3-websockets': ['tests/asyncio/test_client.py:ClientTests.test_reconnect']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2734/steps/15/logs/stdio
Signature · 2 lines
Best regards, João Marcos Costa
Re: [OE-core] [PATCH 2/5] python3-uvloop: enable ptest
Quoted 30 lines · Joao Marcos Costa
Hello, Tim and Mathieu
On 11/2/26 3:10 PM, Mathieu Dubois-Briand via openembedded-core wrote:
(...)Quoted 20 lines
I can see it tends to fail on riscv.
First build:
Failed ptests:
{'python3-uvloop': ['tests/test_regr1.py:TestIssue39Regr.test_issue39_regression','tests/test_tcp.py:Test_UV_TCPSSL.test_create_connection_ssl_1', 'tests/test_tcp.py:Test_UV_TCPSSL.test_create_server_ssl_over_ssl', 'tests/test_tcp.py:Test_UV_TCPSSL.test_renegotiation', 'tests/test_tcp.py:Test_AIO_TCPSSL.test_create_connection_ssl_1', 'tests/test_unix.py:Test_UV_UnixSSL.test_create_unix_connection_ssl_1', 'tests/test_unix.py:Test_AIO_UnixSSL.test_create_unix_connection_ssl_1', 'tests/test_unix.py:Test_AIO_UnixSSL.test_create_unix_server_ssl_1']}https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2713
Second build:
Failed ptests:
{'python3-uvloop': ['tests/test_regr1.py:TestIssue39Regr.test_issue39_regression']}
https://autobuilder.yoctoproject.org/valkyrie/#/builders/56/builds/2714Quoted 5 lines
This is riscv, so emulation is slower than for other architectures. Maybe we need to relax a bit some timings.
Thanks,
Mathieu
Quoted 6 lines
FYI, there was another failure on RISC-V related to another patch in this series:
Failed ptests:
{'python3-websockets':
['tests/asyncio/test_client.py:ClientTests.test_reconnect']}
Given the discussion with Ross about abandoning ptest for python3-websockets, there is no longer a reason to import python3-uvloop, so drop this entire series.
Thank you for the review and feedback.
--Tim
PATCH 3/5 python3-uvloop: upgrade 0.22.1 -> 0.23.0
In reply to [email protected]From: Tim Orling <[email protected]>
Upstream replaced the wheel build dependency with packaging.
https://github.com/MagicStack/uvloop/releases/tag/v0.23.0
https://github.com/MagicStack/uvloop/compare/v0.22.1...v0.23.0
Tested with core-image-ptest-python3-uvloop on qemux86-64 (kvm, tap):
471 passed, 36 skipped, 0 failed.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
.../{python3-uvloop_0.22.1.bb => python3-uvloop_0.23.0.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/python/{python3-uvloop_0.22.1.bb => python3-uvloop_0.23.0.bb} (89%)meta/recipes-devtools/python/python3-uvloop_0.23.0.bb renamed from meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +2 -2
@@ -5,13 +5,13 @@ LICENSE = "Apache-2.0 OR MIT" LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ file://LICENSE-MIT;md5=489c8bc34154e4b59f5c58e664f7d70f" -DEPENDS += "libuv python3-wheel-native" +DEPENDS += "libuv python3-packaging-native" SRC_URI += "\ file://0001-setup.cfg-use-system-libuv.patch \ file://run-ptest \ " -SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" +SRC_URI[sha256sum] = "28d160f51ab4da3b187063652e643dea6831072add4adc1e6d62afbe73b6be27" inherit pypi python_setuptools_build_meta cython ptest-python-pytest
Signature · 1 line
2.47.3
PATCH 4/5 python3-websockets: enable ptest; use git fetcher
In reply to [email protected]From: Tim Orling <[email protected]>
The PyPI sdist prunes tests/, so fetch the 17.1 tag from git. This re-enables ptest, reverted in a0488f2e1d when the sdist dropped the tests.
Upstream advises packagers against running the suite because timeout tests can flake on slow build farms; under ptest it runs on the target, and it passed repeatedly on qemux86-64.
tests/trio is ignored because python3-trio is not in oe-core. python3-misc provides tracemalloc for the test utilities. Set CVE_PRODUCT to the NVD websockets_project:websockets, since the pypi default no longer applies and never matched.
Tested with core-image-ptest-python3-websockets on qemux86-64 (kvm):
2031 passed, 75 skipped, 0 failed in 82s, so add it to PTESTS_SLOW.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
--- meta/conf/distro/include/ptest-packagelists.inc | 1 + .../python/python3-websockets/run-ptest | 3 +++ .../python/python3-websockets_17.1.bb | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 meta/recipes-devtools/python/python3-websockets/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -155,6 +155,7 @@ PTESTS_SLOW = "\ python3-cryptography \ python3-numpy \ python3-uvloop \ + python3-websockets \ python3-xmltodict \ strace \ tar \
meta/recipes-devtools/python/python3-websockets/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh +# tests/trio requires python3-trio, which is not in oe-core +pytest --automake --ignore=tests/trio
meta/recipes-devtools/python/python3-websockets_17.1.bb +13 -2
@@ -4,12 +4,23 @@ HOMEPAGE = "https://github.com/aaugustin/websockets" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=51924a6af4495b8cfaee1b1da869b6f4" -inherit pypi python_setuptools_build_meta +# The PyPI sdist prunes tests, so fetch from git for ptest +SRC_URI = "\ + git://github.com/python-websockets/websockets;branch=main;protocol=https;tag=${PV} \ + file://run-ptest \ +" +SRCREV = "e87ea9be0373edd5065b5e94dfa714cfde23023b" + +CVE_PRODUCT = "websockets_project:websockets" -SRC_URI[sha256sum] = "acfea4c20bf54384883ea33b1240fc1db4f52e190823a4e2b334bc3e8bfca96a" +inherit python_setuptools_build_meta ptest-python-pytest BBCLASSEXTEND = "native nativesdk" RDEPENDS:${PN} = " \ python3-asyncio \ " + +RDEPENDS:${PN}-ptest += "\ + python3-misc \ +"
Signature · 1 line
2.47.3
PATCH 5/5 python3-websockets: upgrade 17.1 -> 17.4
In reply to [email protected]From: Tim Orling <[email protected]>
17.4 fixes a denial of service by memory exhaustion: recv() now rejects fragmented messages split into more than 4096 frames (tunable via WEBSOCKETS_MAX_FRAGMENTS). 17.2 and 17.3 are bug fix releases.
17.3 added uvloop variants of the asyncio tests, so add python3-uvloop to the ptest dependencies.
https://websockets.readthedocs.io/en/stable/project/changelog.html
https://github.com/python-websockets/websockets/compare/17.1...17.4
Tested with core-image-ptest-python3-websockets on qemux86-64 (kvm, slirp): 2550 passed, 114 skipped, 0 failed.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
.../{python3-websockets_17.1.bb => python3-websockets_17.4.bb} | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-websockets_17.1.bb => python3-websockets_17.4.bb} (89%)meta/recipes-devtools/python/python3-websockets_17.4.bb renamed from meta/recipes-devtools/python/python3-websockets_17.1.bb +2 -1
@@ -9,7 +9,7 @@ SRC_URI = "\ git://github.com/python-websockets/websockets;branch=main;protocol=https;tag=${PV} \ file://run-ptest \ " -SRCREV = "e87ea9be0373edd5065b5e94dfa714cfde23023b" +SRCREV = "625a59ed613ac60e60d577dd64b8641d59ecb2b1" CVE_PRODUCT = "websockets_project:websockets"
@@ -23,4 +23,5 @@ RDEPENDS:${PN} = " \ RDEPENDS:${PN}-ptest += "\ python3-misc \ + python3-uvloop \ "
Signature · 1 line
2.47.3
PATCH v2 1/5 python3-uvloop: import 0.22.1 from meta-homeassistant
In reply to [email protected]From: Tim Orling <[email protected]>
uvloop is an asyncio event loop built on libuv. The python3-websockets test suite exercises it, so bring it into oe-core.
Changes from the meta-homeassistant recipe:
* Build against the oe-core libuv recipe through setup.cfg, instead of patching setup.py; drop the Cython pin relaxation, since ~=3.1 already allows Cython 3.2.
* LICENSE is "Apache-2.0 OR MIT" (dual-licensed upstream), and the vendored libuv licenses are dropped since it is not built.
* Drop aiohttp, psutil and pyopenssl from RDEPENDS; they are only test dependencies. Add python3-asyncio.
* Move the maintainer entry to maintainers.inc.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Unchanged from v1
meta/conf/distro/include/maintainers.inc | 1 + .../0001-setup.cfg-use-system-libuv.patch | 21 +++++++++++++++++++ .../python/python3-uvloop_0.22.1.bb | 17 +++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-uvloop/0001-setup.cfg-use-system-libuv.patch create mode 100644 meta/recipes-devtools/python/python3-uvloop_0.22.1.bb
meta/conf/distro/include/maintainers.inc +1 -0
@@ -750,6 +750,7 @@ RECIPE_MAINTAINER:pn-python3-unittest-automake-output = "Ross Burton <ross.burto RECIPE_MAINTAINER:pn-python3-uritools = "Marta Rybczynska <[email protected]>" RECIPE_MAINTAINER:pn-python3-urllib3 = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-uv-build = "Trevor Gamblin <[email protected]>" +RECIPE_MAINTAINER:pn-python3-uvloop = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-vcs-versioning = "Trevor Gamblin <[email protected]>" RECIPE_MAINTAINER:pn-python3-vcversioner = "Bruce Ashfield <[email protected]>" RECIPE_MAINTAINER:pn-python3-wcwidth = "Tim Orling <[email protected]>"
meta/recipes-devtools/python/python3-uvloop/0001-setup.cfg-use-system-libuv.patch new file +21 -0
@@ -0,0 +1,21 @@ +From: Tim Orling <[email protected]> +Subject: [PATCH] setup.cfg: use system libuv + +Build against the libuv recipe instead of the bundled copy in +vendor/libuv. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Tim Orling <[email protected]> +--- + setup.cfg | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,3 +1,6 @@ ++[build_ext] ++use_system_libuv = 1 ++ + [egg_info] + tag_build = + tag_date = 0
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb new file +17 -0
@@ -0,0 +1,17 @@ +SUMMARY = "Fast implementation of asyncio event loop on top of libuv" +HOMEPAGE = "https://github.com/MagicStack/uvloop" +BUGTRACKER = "https://github.com/MagicStack/uvloop/issues" +LICENSE = "Apache-2.0 OR MIT" +LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ + file://LICENSE-MIT;md5=489c8bc34154e4b59f5c58e664f7d70f" + +DEPENDS += "libuv python3-wheel-native" + +SRC_URI += "file://0001-setup.cfg-use-system-libuv.patch" +SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" + +inherit pypi python_setuptools_build_meta cython + +RDEPENDS:${PN} = "python3-asyncio" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.47.3
PATCH v3 1/5 python3-uvloop: import 0.22.1 from meta-homeassistant
From: Tim Orling <[email protected]>
uvloop is an asyncio event loop built on libuv. The python3-websockets test suite exercises it, so bring it into oe-core.
Changes from the meta-homeassistant recipe:
* Build against the oe-core libuv recipe through setup.cfg, instead of patching setup.py; drop the Cython pin relaxation, since ~=3.1 already allows Cython 3.2.
* LICENSE is "Apache-2.0 OR MIT" (dual-licensed upstream), and the vendored libuv licenses are dropped since it is not built.
* Drop aiohttp, psutil and pyopenssl from RDEPENDS; they are only test dependencies. Add python3-asyncio.
* Move the maintainer entry to maintainers.inc.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
No changes in v2 or v3.
meta/conf/distro/include/maintainers.inc | 1 + .../0001-setup.cfg-use-system-libuv.patch | 21 +++++++++++++++++++ .../python/python3-uvloop_0.22.1.bb | 17 +++++++++++++++ 3 files changed, 39 insertions(+) create mode 100644 meta/recipes-devtools/python/python3-uvloop/0001-setup.cfg-use-system-libuv.patch create mode 100644 meta/recipes-devtools/python/python3-uvloop_0.22.1.bb
meta/conf/distro/include/maintainers.inc +1 -0
@@ -750,6 +750,7 @@ RECIPE_MAINTAINER:pn-python3-unittest-automake-output = "Ross Burton <ross.burto RECIPE_MAINTAINER:pn-python3-uritools = "Marta Rybczynska <[email protected]>" RECIPE_MAINTAINER:pn-python3-urllib3 = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-uv-build = "Trevor Gamblin <[email protected]>" +RECIPE_MAINTAINER:pn-python3-uvloop = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-vcs-versioning = "Trevor Gamblin <[email protected]>" RECIPE_MAINTAINER:pn-python3-vcversioner = "Bruce Ashfield <[email protected]>" RECIPE_MAINTAINER:pn-python3-wcwidth = "Tim Orling <[email protected]>"
meta/recipes-devtools/python/python3-uvloop/0001-setup.cfg-use-system-libuv.patch new file +21 -0
@@ -0,0 +1,21 @@ +From: Tim Orling <[email protected]> +Subject: [PATCH] setup.cfg: use system libuv + +Build against the libuv recipe instead of the bundled copy in +vendor/libuv. + +Upstream-Status: Inappropriate [oe-core specific] +Signed-off-by: Tim Orling <[email protected]> +--- + setup.cfg | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/setup.cfg ++++ b/setup.cfg +@@ -1,3 +1,6 @@ ++[build_ext] ++use_system_libuv = 1 ++ + [egg_info] + tag_build = + tag_date = 0
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb new file +17 -0
@@ -0,0 +1,17 @@ +SUMMARY = "Fast implementation of asyncio event loop on top of libuv" +HOMEPAGE = "https://github.com/MagicStack/uvloop" +BUGTRACKER = "https://github.com/MagicStack/uvloop/issues" +LICENSE = "Apache-2.0 OR MIT" +LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ + file://LICENSE-MIT;md5=489c8bc34154e4b59f5c58e664f7d70f" + +DEPENDS += "libuv python3-wheel-native" + +SRC_URI += "file://0001-setup.cfg-use-system-libuv.patch" +SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" + +inherit pypi python_setuptools_build_meta cython + +RDEPENDS:${PN} = "python3-asyncio" + +BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.47.3
PATCH v3 2/5 python3-uvloop: enable ptest
From: Tim Orling <[email protected]>
The sdist ships the test suite. As in the python3 recipe, the recipe lists the tests to skip in SKIPPED_TESTS and writes them into run-ptest:
* tests that conflict with pytest's output capture;
* tests broken by libuv 1.53.0 spawning with posix_spawn() on Linux, which bypasses uvloop's preexec_fn fork hook;
* DNS tests that wait for resolver timeouts without network access, which took the suite from 1 to 10 minutes over tap without NAT;
* on riscv64 only (an override), TLS stress tests, the issue39 deadlock check and a socket cancellation test, whose fixed timeouts are too short for qemu without KVM.
.flake8 and mypy.ini let test_sourcecode skip cleanly when flake8 and mypy are missing.
Tested with core-image-ptest-python3-uvloop on qemux86-64 and qemuriscv64. It takes over 30 seconds, so add it to PTESTS_SLOW.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Changes in v3:
- Keep the skip list in the recipe as SKIPPED_TESTS, as python3 does, with the riscv64 tests in an override instead of a uname check
- Rename KEEP to DNS_FILTER and explain why -k handles test_getaddrinfo_{1,2}
Changes in v2:
- Skip 13 timing sensitive tests on riscv64 only, covering the qemuriscv64 AutoBuilder failures plus their counterparts in the other event loop class and test_socket_cancel_sock_sendall, found in 10 runs under load
- Build the -k expression in a loop to fix patchtest's line length check
- Drop the test counts from the commit message
.../distro/include/ptest-packagelists.inc | 1 + .../python/python3-uvloop/run-ptest | 11 +++ .../python/python3-uvloop_0.22.1.bb | 78 ++++++++++++++++++- 3 files changed, 88 insertions(+), 2 deletions(-) create mode 100755 meta/recipes-devtools/python/python3-uvloop/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -154,6 +154,7 @@ PTESTS_SLOW = "\ python3-click \ python3-cryptography \ python3-numpy \ + python3-uvloop \ python3-xmltodict \ strace \ tar \
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +11 -0
@@ -0,0 +1,11 @@ +#!/bin/sh +# The recipe fills in SKIPPED_TESTS. +SKIPPED_TESTS= +# test_getaddrinfo_{1,2} wait for the resolver timeout without network access. +# --deselect and -k would also drop test_getaddrinfo_1x and _2x, so exclude +# 1 and 2 with -k and add the rest back. +DNS_FILTER="not (test_getaddrinfo_1 or test_getaddrinfo_2)" +for n in 10 11 12 13 14 15 16 17 18 19 20 21 22; do + DNS_FILTER="$DNS_FILTER or test_getaddrinfo_$n" +done +pytest --automake $SKIPPED_TESTS -k "$DNS_FILTER"
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +76 -2
87 lines not on this page · raw message
Signature · 1 line
2.47.3
PATCH v3 3/5 python3-uvloop: upgrade 0.22.1 -> 0.23.0
In reply to [email protected]From: Tim Orling <[email protected]>
Upstream replaced the wheel build dependency with packaging.
https://github.com/MagicStack/uvloop/releases/tag/v0.23.0
https://github.com/MagicStack/uvloop/compare/v0.22.1...v0.23.0
Tested with core-image-ptest-python3-uvloop on qemux86-64 and qemuriscv64.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Changes in v3: none
Changes in v2:
- Drop the test counts from the commit message
.../{python3-uvloop_0.22.1.bb => python3-uvloop_0.23.0.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/python/{python3-uvloop_0.22.1.bb => python3-uvloop_0.23.0.bb} (96%)meta/recipes-devtools/python/python3-uvloop_0.23.0.bb renamed from meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +2 -2
@@ -5,13 +5,13 @@ LICENSE = "Apache-2.0 OR MIT" LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ file://LICENSE-MIT;md5=489c8bc34154e4b59f5c58e664f7d70f" -DEPENDS += "libuv python3-wheel-native" +DEPENDS += "libuv python3-packaging-native" SRC_URI += "\ file://0001-setup.cfg-use-system-libuv.patch \ file://run-ptest \ " -SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" +SRC_URI[sha256sum] = "28d160f51ab4da3b187063652e643dea6831072add4adc1e6d62afbe73b6be27" inherit pypi python_setuptools_build_meta cython ptest-python-pytest
Signature · 1 line
2.47.3
PATCH v3 4/5 python3-websockets: enable ptest; use git fetcher
In reply to [email protected]From: Tim Orling <[email protected]>
The PyPI sdist prunes tests/, so fetch the 17.1 tag from git. This re-enables ptest, reverted in a0488f2e1d when the sdist dropped the tests.
Upstream advises packagers against running the suite because timeout tests can flake on slow build farms; under ptest it runs on the target, and it passed repeatedly on qemux86-64.
tests/trio is ignored because python3-trio is not in oe-core. python3-misc provides tracemalloc for the test utilities. Set CVE_PRODUCT to the NVD websockets_project:websockets, since the pypi default no longer applies and never matched.
Tested with core-image-ptest-python3-websockets on qemux86-64. It takes over 30 seconds, so add it to PTESTS_SLOW.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Changes in v3: none
Changes in v2:
- Drop the test counts from the commit message
meta/conf/distro/include/ptest-packagelists.inc | 1 + .../python/python3-websockets/run-ptest | 3 +++ .../python/python3-websockets_17.1.bb | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 meta/recipes-devtools/python/python3-websockets/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -155,6 +155,7 @@ PTESTS_SLOW = "\ python3-cryptography \ python3-numpy \ python3-uvloop \ + python3-websockets \ python3-xmltodict \ strace \ tar \
meta/recipes-devtools/python/python3-websockets/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh +# tests/trio requires python3-trio, which is not in oe-core +pytest --automake --ignore=tests/trio
meta/recipes-devtools/python/python3-websockets_17.1.bb +13 -2
@@ -4,12 +4,23 @@ HOMEPAGE = "https://github.com/aaugustin/websockets" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=51924a6af4495b8cfaee1b1da869b6f4" -inherit pypi python_setuptools_build_meta +# The PyPI sdist prunes tests, so fetch from git for ptest +SRC_URI = "\ + git://github.com/python-websockets/websockets;branch=main;protocol=https;tag=${PV} \ + file://run-ptest \ +" +SRCREV = "e87ea9be0373edd5065b5e94dfa714cfde23023b" + +CVE_PRODUCT = "websockets_project:websockets" -SRC_URI[sha256sum] = "acfea4c20bf54384883ea33b1240fc1db4f52e190823a4e2b334bc3e8bfca96a" +inherit python_setuptools_build_meta ptest-python-pytest BBCLASSEXTEND = "native nativesdk" RDEPENDS:${PN} = " \ python3-asyncio \ " + +RDEPENDS:${PN}-ptest += "\ + python3-misc \ +"
Signature · 1 line
2.47.3
PATCH v3 5/5 python3-websockets: upgrade 17.1 -> 17.4
In reply to [email protected]From: Tim Orling <[email protected]>
17.4 fixes a denial of service by memory exhaustion: recv() now rejects fragmented messages split into more than 4096 frames (tunable via WEBSOCKETS_MAX_FRAGMENTS). 17.2 and 17.3 are bug fix releases.
17.3 added uvloop variants of the asyncio tests, so add python3-uvloop to the ptest dependencies.
https://websockets.readthedocs.io/en/stable/project/changelog.html
https://github.com/python-websockets/websockets/compare/17.1...17.4
Tested with core-image-ptest-python3-websockets on qemux86-64 and qemuriscv64.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Changes in v3: none
Changes in v2:
- Drop the test counts from the commit message
.../{python3-websockets_17.1.bb => python3-websockets_17.4.bb} | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-websockets_17.1.bb => python3-websockets_17.4.bb} (89%)meta/recipes-devtools/python/python3-websockets_17.4.bb renamed from meta/recipes-devtools/python/python3-websockets_17.1.bb +2 -1
@@ -9,7 +9,7 @@ SRC_URI = "\ git://github.com/python-websockets/websockets;branch=main;protocol=https;tag=${PV} \ file://run-ptest \ " -SRCREV = "e87ea9be0373edd5065b5e94dfa714cfde23023b" +SRCREV = "625a59ed613ac60e60d577dd64b8641d59ecb2b1" CVE_PRODUCT = "websockets_project:websockets"
@@ -23,4 +23,5 @@ RDEPENDS:${PN} = " \ RDEPENDS:${PN}-ptest += "\ python3-misc \ + python3-uvloop \ "
Signature · 1 line
2.47.3
PATCH v2 2/5 python3-uvloop: enable ptest
In reply to [email protected]From: Tim Orling <[email protected]>
The sdist ships the test suite. run-ptest deselects:
* tests that conflict with pytest's output capture;
* tests broken by libuv 1.53.0 spawning with posix_spawn() on Linux, which bypasses uvloop's preexec_fn fork hook;
* DNS tests that wait for resolver timeouts without network access, which took the suite from 1 to 10 minutes over tap without NAT;
* on riscv64 only, TLS stress tests, the issue39 deadlock check and a socket cancellation test, whose fixed timeouts are too short for qemu without KVM.
.flake8 and mypy.ini let test_sourcecode skip cleanly when flake8 and mypy are missing.
Tested with core-image-ptest-python3-uvloop on qemux86-64. It takes over 30 seconds, so add it to PTESTS_SLOW.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Changes in v2:
- Skip 13 timing sensitive tests on riscv64 only, covering the qemuriscv64 AutoBuilder failures plus their counterparts in the other event loop class and test_socket_cancel_sock_sendall, found in 10 runs under load (stress-ng)
- Build the -k expression in a loop to fix patchtest's line length check
- Drop the test counts from the commit message
.../distro/include/ptest-packagelists.inc | 1 + .../python/python3-uvloop/run-ptest | 50 +++++++++++++++++++ .../python/python3-uvloop_0.22.1.bb | 27 +++++++++- 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100755 meta/recipes-devtools/python/python3-uvloop/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -154,6 +154,7 @@ PTESTS_SLOW = "\ python3-click \ python3-cryptography \ python3-numpy \ + python3-uvloop \ python3-xmltodict \ strace \ tar \
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +50 -0
50 lines not on this page · raw message
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +25 -2
@@ -7,11 +7,34 @@ LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ DEPENDS += "libuv python3-wheel-native" -SRC_URI += "file://0001-setup.cfg-use-system-libuv.patch" +SRC_URI += "\ + file://0001-setup.cfg-use-system-libuv.patch \ + file://run-ptest \ +" SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" -inherit pypi python_setuptools_build_meta cython +inherit pypi python_setuptools_build_meta cython ptest-python-pytest RDEPENDS:${PN} = "python3-asyncio" +RDEPENDS:${PN}-ptest += "\ + python3-ctypes \ + python3-io \ + python3-logging \ + python3-math \ + python3-multiprocessing \ + python3-netclient \ + python3-numbers \ + python3-pickle \ + python3-pprint \ + python3-psutil \ + python3-pyopenssl \ + python3-threading \ +" + +do_install_ptest:append() { + # test_sourcecode needs these to skip cleanly when flake8 and mypy are missing + install -m 0644 ${S}/.flake8 ${S}/mypy.ini ${D}${PTEST_PATH}/ +} + BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.47.3
Re: [PATCH v2 2/5] python3-uvloop: enable ptest
Quoted 74 lines · tim.orling
From: Tim Orling <[email protected]>
The sdist ships the test suite. run-ptest deselects:
* tests that conflict with pytest's output capture;
* tests broken by libuv 1.53.0 spawning withposix_spawn()on Linux, which bypasses uvloop'spreexec_fnfork hook;
* DNS tests that wait for resolver timeouts without network access, which took the suite from 1 to 10 minutes over tap without NAT;
* on riscv64 only, TLS stress tests, the issue39 deadlock check and a socket cancellation test, whose fixed timeouts are too short for qemu without KVM..flake8 and mypy.ini let
test_sourcecodeskip cleanly when flake8 and mypy are missing.Tested with core-image-ptest-python3-uvloop on qemux86-64. It takes over 30 seconds, so add it to
PTESTS_SLOW.AI-Generated: Uses Claude Code (Claude Opus 5.5)
Signed-off-by Tim Orling <[email protected]>---
Changes in v2:
- Skip 13 timing sensitive tests on riscv64 only, covering the qemuriscv64 AutoBuilder failures plus their counterparts in the other event loop class andtest_socket_cancel_sock_sendall, found in 10 runs under load (stress-ng)
- Build the -k expression in a loop to fix patchtest's line length check
- Drop the test counts from the commit message.../distro/include/ptest-packagelists.inc | 1 + .../python/python3-uvloop/run-ptest | 50 +++++++++++++++++++ .../python/python3-uvloop_0.22.1.bb | 27 +++++++++- 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100755 meta/recipes-devtools/python/python3-uvloop/run-ptestmeta/conf/distro/include/ptest-packagelists.inc +1
-0@@ -154,6 +154,7 @@ PTESTS_SLOW = "\ python3-click \ python3-cryptography \ python3-numpy \ + python3-uvloop \ python3-xmltodict \ strace \ tar \meta/recipes-devtools/python/python3-uvloop/run-ptest new file +21
-0@@ -0,0 +1,50 @@ +#!/bin/sh +# test_process_streams_redirect: replaces the stdout/stderr fds, which +# conflicts with pytest's output capture. +# test_process_preexec_fn_{1,2}, Test_UV_DNS test_getaddrinfo_{8,9}: libuv +# 1.53.0 spawns with posix_spawn(), so preexec_fn never runs, and an empty +# host gives EAI_NODATA. +# test_getaddrinfo_{1,2,3,5,6,11}, Test_AIO_DNS test_getaddrinfo_{8,9}: each +# DNS lookup waits for the resolver timeout without network access. +# --deselect matches a node id prefix, so -k handles 1, 2 and 11. +# riscv64: qemu runs without KVM there, too slow for the fixed timeouts in +# the TLS stress tests, the issue39 deadlock check (signal.alarm(5)) and +# test_socket_cancel_sock_sendall, which must cancel within 0.2s. +SLOW="" +if [ "$(uname -m)" = "riscv64" ]; then + SLOW=" + --deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_create_connection_ssl_1 + --deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_create_server_ssl_over_ssl + --deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_renegotiation + --deselect=tests/test_tcp.py::Test_AIO_TCPSSL::test_create_connection_ssl_1 + --deselect=tests/test_tcp.py::Test_AIO_TCPSSL::test_create_server_ssl_over_ssl + --deselect=tests/test_tcp.py::Test_AIO_TCPSSL::test_renegotiation
meta/recipes-devtools/python/python3-uvloop/run-ptest line 31
Quoted 10 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +10
-0+ --deselect=tests/test_unix.py::Test_UV_UnixSSL::test_create_unix_connection_ssl_1 + --deselect=tests/test_unix.py::Test_UV_UnixSSL::test_create_unix_server_ssl_1 + --deselect=tests/test_unix.py::Test_AIO_UnixSSL::test_create_unix_connection_ssl_1 + --deselect=tests/test_unix.py::Test_AIO_UnixSSL::test_create_unix_server_ssl_1 + --deselect=tests/test_regr1.py::TestIssue39Regr::test_issue39_regression + --deselect=tests/test_sockets.py::TestUVSockets::test_socket_cancel_sock_sendall + --deselect=tests/test_sockets.py::TestAIOSockets::test_socket_cancel_sock_sendall + " +fi +KEEP="not (test_getaddrinfo_1 or test_getaddrinfo_2)"
This 'KEEP' variable name seems misleading given that it's using 'not' to avoid running those two test cases, but then gets built up in a loop. I think it'd be better to just add them with --deselect like the others, even if it ends up being more verbose.
Quoted 9 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +9
-0+for n in 10 12 13 14 15 16 17 18 19 20 21 22; do + KEEP="$KEEP or test_getaddrinfo_$n" +done +pytest --automake $SLOW \ + -k "$KEEP" \ + --deselect=tests/test_process.py::Test_UV_Process::test_process_streams_redirect \ + --deselect=tests/test_process.py::Test_AIO_Process::test_process_streams_redirect \ + --deselect=tests/test_process.py::Test_UV_Process::test_process_preexec_fn_1 \ + --deselect=tests/test_process.py::Test_UV_Process::test_process_preexec_fn_2 \
meta/recipes-devtools/python/python3-uvloop/run-ptest line 50
Quoted 10 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +10
-0+ --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_3 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_5 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_6 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_8 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_9 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_3 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_5 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_6 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_8 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_9
I wonder if we could keep this list inside the recipe file itself, similar to how python3's recipe uses SKIPPED_TESTS with various appends? That example uses unittest instead of pytest, but it should be possible to pass the list. Maybe I'm wrong.
Trevor
Quoted 41 lines
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +25
-2@@ -7,11 +7,34 @@ LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ DEPENDS += "libuv python3-wheel-native" -SRC_URI += "file://0001-setup.cfg-use-system-libuv.patch" +SRC_URI += "\ + file://0001-setup.cfg-use-system-libuv.patch \ + file://run-ptest \ +" SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" -inherit pypi python_setuptools_build_meta cython +inherit pypi python_setuptools_build_meta cython ptest-python-pytest RDEPENDS:${PN} = "python3-asyncio" +RDEPENDS:${PN}-ptest += "\ + python3-ctypes \ + python3-io \ + python3-logging \ + python3-math \ + python3-multiprocessing \ + python3-netclient \ + python3-numbers \ + python3-pickle \ + python3-pprint \ + python3-psutil \ + python3-pyopenssl \ + python3-threading \ +" + +do_install_ptest:append() { + # test_sourcecode needs these to skip cleanly when flake8 and mypy are missing + install -m 0644 ${S}/.flake8 ${S}/mypy.ini ${D}${PTEST_PATH}/ +} + BBCLASSEXTEND = "native nativesdk"
Re: [OE-core] [PATCH v2 2/5] python3-uvloop: enable ptest
Quoted 139 lines · Trevor Gamblin via openembedded-core
Quoted 29 lines · tim.orling
From: Tim Orling <[email protected]>
The sdist ships the test suite. run-ptest deselects:
* tests that conflict with pytest's output capture;
* tests broken by libuv 1.53.0 spawning withposix_spawn()on Linux, which bypasses uvloop'spreexec_fnfork hook;
* DNS tests that wait for resolver timeouts without network access, which took the suite from 1 to 10 minutes over tap without NAT;
* on riscv64 only, TLS stress tests, the issue39 deadlock check and a socket cancellation test, whose fixed timeouts are too short for qemu without KVM..flake8 and mypy.ini let
test_sourcecodeskip cleanly when flake8 and mypy are missing.Tested with core-image-ptest-python3-uvloop on qemux86-64. It takes over 30 seconds, so add it to
PTESTS_SLOW.AI-Generated: Uses Claude Code (Claude Opus 5.5)
Signed-off-by Tim Orling <[email protected]>---
Changes in v2:
- Skip 13 timing sensitive tests on riscv64 only, covering the qemuriscv64 AutoBuilder failures plus their counterparts in the other event loop class andtest_socket_cancel_sock_sendall, found in 10 runs under load (stress-ng)
- Build the -k expression in a loop to fix patchtest's line length check
- Drop the test counts from the commit messageReview
Quoted 7 lines
.../distro/include/ptest-packagelists.inc | 1 + .../python/python3-uvloop/run-ptest | 50 +++++++++++++++++++ .../python/python3-uvloop_0.22.1.bb | 27 +++++++++- 3 files changed, 76 insertions(+), 2 deletions(-) create mode 100755 meta/recipes-devtools/python/python3-uvloop/run-ptest(quoted diff) +0
-0b/meta/conf/distro/include/ptest-packagelists.inc
Review
Quoted 12 lines
index
bef45bb4d5..50b971bace100644meta/conf/distro/include/ptest-packagelists.inc +1
-0@@ -154,6 +154,7 @@ PTESTS_SLOW = "\ python3-click \ python3-cryptography \ python3-numpy \ + python3-uvloop \ python3-xmltodict \ strace \ tar \(quoted diff) +0
-0b/meta/recipes-devtools/python/python3-uvloop/run-ptest
meta/recipes-devtools/python/python3-uvloop/run-ptest line 4
Quoted 9 lines
new file mode 100755
index 0000000000..0cb9a26b88meta/recipes-devtools/python/python3-uvloop/run-ptest new file +4
-0@@ -0,0 +1,50 @@ +#!/bin/sh +# test_process_streams_redirect: replaces the stdout/stderr fds, which +# conflicts with pytest's output capture. +# test_process_preexec_fn_{1,2}, Test_UV_DNS test_getaddrinfo_{8,9}:libuv
meta/recipes-devtools/python/python3-uvloop/run-ptest line 5
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+# 1.53.0 spawns with posix_spawn(), so preexec_fn never runs, and anempty
meta/recipes-devtools/python/python3-uvloop/run-ptest line 7
Quoted 2 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +2
-0+# host gives EAI_NODATA. +# test_getaddrinfo_{1,2,3,5,6,11}, Test_AIO_DNS test_getaddrinfo_{8,9}:each
meta/recipes-devtools/python/python3-uvloop/run-ptest
Quoted 3 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +3
-0+# DNS lookup waits for the resolver timeout without network access. +# --deselect matches a node id prefix, so -k handles 1, 2 and 11. +# riscv64: qemu runs without KVM there, too slow for the fixed timeoutsin
meta/recipes-devtools/python/python3-uvloop/run-ptest
Quoted 6 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +6
-0+# the TLS stress tests, the issue39 deadlock check (signal.alarm(5)) and +# test_socket_cancel_sock_sendall, which must cancel within 0.2s. +SLOW="" +if [ "$(uname -m)" = "riscv64" ]; then + SLOW=" +--deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_create_connection_ssl_1
meta/recipes-devtools/python/python3-uvloop/run-ptest line 17
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_create_server_ssl_over_ssl
meta/recipes-devtools/python/python3-uvloop/run-ptest line 19
Quoted 2 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +2
-0+ --deselect=tests/test_tcp.py::Test_UV_TCPSSL::test_renegotiation +--deselect=tests/test_tcp.py::Test_AIO_TCPSSL::test_create_connection_ssl_1
meta/recipes-devtools/python/python3-uvloop/run-ptest line 20
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_tcp.py::Test_AIO_TCPSSL::test_create_server_ssl_over_ssl
meta/recipes-devtools/python/python3-uvloop/run-ptest line 21
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_tcp.py::Test_AIO_TCPSSL::test_renegotiation
meta/recipes-devtools/python/python3-uvloop/run-ptest line 22
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_unix.py::Test_UV_UnixSSL::test_create_unix_connection_ssl_1
meta/recipes-devtools/python/python3-uvloop/run-ptest line 23
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_unix.py::Test_UV_UnixSSL::test_create_unix_server_ssl_1
meta/recipes-devtools/python/python3-uvloop/run-ptest line 24
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_unix.py::Test_AIO_UnixSSL::test_create_unix_connection_ssl_1
meta/recipes-devtools/python/python3-uvloop/run-ptest line 25
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_unix.py::Test_AIO_UnixSSL::test_create_unix_server_ssl_1
meta/recipes-devtools/python/python3-uvloop/run-ptest line 26
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_regr1.py::TestIssue39Regr::test_issue39_regression
meta/recipes-devtools/python/python3-uvloop/run-ptest line 27
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_sockets.py::TestUVSockets::test_socket_cancel_sock_sendall
meta/recipes-devtools/python/python3-uvloop/run-ptest line 28
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_sockets.py::TestAIOSockets::test_socket_cancel_sock_sendall
meta/recipes-devtools/python/python3-uvloop/run-ptest line 31
Quoted 3 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +3
-0+ " +fi +KEEP="not (test_getaddrinfo_1 or test_getaddrinfo_2)"This 'KEEP' variable name seems misleading given that it's using 'not' to avoid
running those two test cases, but then gets built up in a loop. I think it'd be
better to just add them with --deselect like the others, even if it ends up being more verbose.meta/recipes-devtools/python/python3-uvloop/run-ptest
Quoted 6 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +6
-0+for n in 10 12 13 14 15 16 17 18 19 20 21 22; do + KEEP="$KEEP or test_getaddrinfo_$n" +done +pytest --automake $SLOW \ + -k "$KEEP" \ +--deselect=tests/test_process.py::Test_UV_Process::test_process_streams_redirect \
meta/recipes-devtools/python/python3-uvloop/run-ptest line 38
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_process.py::Test_AIO_Process::test_process_streams_redirect \
meta/recipes-devtools/python/python3-uvloop/run-ptest line 39
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_process.py::Test_UV_Process::test_process_preexec_fn_1 \
meta/recipes-devtools/python/python3-uvloop/run-ptest line 40
Quoted 1 line
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +1
-0+--deselect=tests/test_process.py::Test_UV_Process::test_process_preexec_fn_2 \
meta/recipes-devtools/python/python3-uvloop/run-ptest line 50
Quoted 10 lines
meta/recipes-devtools/python/python3-uvloop/run-ptest new file +10
-0+ --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_3 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_5 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_6 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_8 \ + --deselect=tests/test_dns.py::Test_UV_DNS::test_getaddrinfo_9 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_3 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_5 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_6 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_8 \ + --deselect=tests/test_dns.py::Test_AIO_DNS::test_getaddrinfo_9
Quoted 8 lines
I wonder if we could keep this list inside the recipe file itself, similar to
how python3's recipe usesSKIPPED_TESTSwith various appends? That example uses
unittest instead of pytest, but it should be possible to pass the list. Maybe
I'm wrong.
Good points that honestly I was not aware of previously. I am working on a SKIPPED_TESTS v3.
Thank you for the review!
--Tim
Quoted 62 lines
Trevor
Review
Quoted 1 line
(quoted diff) +0
-0b/meta/recipes-devtools/python/python3-uvloop_0.22.1.bb
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb LIC_FILES_CHKSUM =
Quoted 4 lines
index
887c262ae7..39b6a2602a100644meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +0
-0@@ -7,11 +7,34 @@ LIC_FILES_CHKSUM ="file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \
Quoted 9 lines
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +4
-1DEPENDS += "libuv python3-wheel-native" -SRC_URI += "file://0001-setup.cfg-use-system-libuv.patch" +SRC_URI += "\ + file://0001-setup.cfg-use-system-libuv.patch \ + file://run-ptest \ +" SRC_URI[sha256sum] ="
6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f"Quoted 13 lines
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +8
-1-inherit pypi python_setuptools_build_meta cython +inherit pypi python_setuptools_build_meta cython ptest-python-pytest RDEPENDS:${PN} = "python3-asyncio" +RDEPENDS:${PN}-ptest += "\ + python3-ctypes \ + python3-io \ + python3-logging \ + python3-math \ + python3-multiprocessing \ + python3-netclient \meta/recipes-devtools/python/python3-uvloop_0.22.1.bb LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \
Quoted 10 lines
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +10
-0+ python3-numbers \ + python3-pickle \ + python3-pprint \ + python3-psutil \ + python3-pyopenssl \ + python3-threading \ +" + +do_install_ptest:append() { + # test_sourcecode needs these to skip cleanly when flake8 and mypyare missing
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ · line 40
Quoted 4 lines
meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +3
-0+ install -m 0644 ${S}/.flake8 ${S}/mypy.ini ${D}${PTEST_PATH}/ +} + BBCLASSEXTEND = "native nativesdk"-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group. View/Reply Online (#249298):
https://lists.openembedded.org/g/openembedded-core/message/249298
Mute This Topic: https://lists.openembedded.org/mt/122082304/924729
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ [email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
PATCH v2 3/5 python3-uvloop: upgrade 0.22.1 -> 0.23.0
In reply to [email protected]From: Tim Orling <[email protected]>
Upstream replaced the wheel build dependency with packaging.
https://github.com/MagicStack/uvloop/releases/tag/v0.23.0
https://github.com/MagicStack/uvloop/compare/v0.22.1...v0.23.0
Tested with core-image-ptest-python3-uvloop on qemux86-64 and qemuriscv64.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Changes in v2:
- Drop the test counts from the commit message
.../{python3-uvloop_0.22.1.bb => python3-uvloop_0.23.0.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-devtools/python/{python3-uvloop_0.22.1.bb => python3-uvloop_0.23.0.bb} (89%)meta/recipes-devtools/python/python3-uvloop_0.23.0.bb renamed from meta/recipes-devtools/python/python3-uvloop_0.22.1.bb +2 -2
@@ -5,13 +5,13 @@ LICENSE = "Apache-2.0 OR MIT" LIC_FILES_CHKSUM = "file://LICENSE-APACHE;md5=bb92739ddad0a2811957bd98bdb90474 \ file://LICENSE-MIT;md5=489c8bc34154e4b59f5c58e664f7d70f" -DEPENDS += "libuv python3-wheel-native" +DEPENDS += "libuv python3-packaging-native" SRC_URI += "\ file://0001-setup.cfg-use-system-libuv.patch \ file://run-ptest \ " -SRC_URI[sha256sum] = "6c84bae345b9147082b17371e3dd5d42775bddce91f885499017f4607fdaf39f" +SRC_URI[sha256sum] = "28d160f51ab4da3b187063652e643dea6831072add4adc1e6d62afbe73b6be27" inherit pypi python_setuptools_build_meta cython ptest-python-pytest
Signature · 1 line
2.47.3
PATCH v2 4/5 python3-websockets: enable ptest; use git fetcher
In reply to [email protected]From: Tim Orling <[email protected]>
The PyPI sdist prunes tests/, so fetch the 17.1 tag from git. This re-enables ptest, reverted in a0488f2e1d when the sdist dropped the tests.
Upstream advises packagers against running the suite because timeout tests can flake on slow build farms; under ptest it runs on the target, and it passed repeatedly on qemux86-64.
tests/trio is ignored because python3-trio is not in oe-core. python3-misc provides tracemalloc for the test utilities. Set CVE_PRODUCT to the NVD websockets_project:websockets, since the pypi default no longer applies and never matched.
Tested with core-image-ptest-python3-websockets on qemux86-64. It takes over 30 seconds, so add it to PTESTS_SLOW.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Changes in v2:
- Drop the test counts from the commit message
meta/conf/distro/include/ptest-packagelists.inc | 1 + .../python/python3-websockets/run-ptest | 3 +++ .../python/python3-websockets_17.1.bb | 15 +++++++++++++-- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100755 meta/recipes-devtools/python/python3-websockets/run-ptest
meta/conf/distro/include/ptest-packagelists.inc +1 -0
@@ -155,6 +155,7 @@ PTESTS_SLOW = "\ python3-cryptography \ python3-numpy \ python3-uvloop \ + python3-websockets \ python3-xmltodict \ strace \ tar \
meta/recipes-devtools/python/python3-websockets/run-ptest new file +3 -0
@@ -0,0 +1,3 @@ +#!/bin/sh +# tests/trio requires python3-trio, which is not in oe-core +pytest --automake --ignore=tests/trio
meta/recipes-devtools/python/python3-websockets_17.1.bb +13 -2
@@ -4,12 +4,23 @@ HOMEPAGE = "https://github.com/aaugustin/websockets" LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=51924a6af4495b8cfaee1b1da869b6f4" -inherit pypi python_setuptools_build_meta +# The PyPI sdist prunes tests, so fetch from git for ptest +SRC_URI = "\ + git://github.com/python-websockets/websockets;branch=main;protocol=https;tag=${PV} \ + file://run-ptest \ +" +SRCREV = "e87ea9be0373edd5065b5e94dfa714cfde23023b" + +CVE_PRODUCT = "websockets_project:websockets" -SRC_URI[sha256sum] = "acfea4c20bf54384883ea33b1240fc1db4f52e190823a4e2b334bc3e8bfca96a" +inherit python_setuptools_build_meta ptest-python-pytest BBCLASSEXTEND = "native nativesdk" RDEPENDS:${PN} = " \ python3-asyncio \ " + +RDEPENDS:${PN}-ptest += "\ + python3-misc \ +"
Signature · 1 line
2.47.3
Re: [OE-core] [PATCH v2 4/5] python3-websockets: enable ptest; use git fetcher
Quoted 6 lines · Tim Orling via openembedded-core
The PyPI sdist prunes tests/, so fetch the 17.1 tag from git. This re-enables ptest, reverted in
a0488f2e1dwhen the sdist dropped the tests.Upstream advises packagers against running the suite because timeout tests can flake on slow build farms; under ptest it runs on the target, and it passed repeatedly on qemux86-64.
Whilst I approve of ptests in general, I think this one will be a cause of pain.
Tests are not shipped in the sdists on purpose[1], and upstream is very clear that the tests are not for packagers[2]:
“”"
If you’re packaging websockets for a distribution, you must use releases published on PyPI as input. You may check SLSA attestations on GitHub.
You mustn’t rely on the git repository as input. Specifically, you mustn’t attempt to run the main test suite. It isn’t treated as a deliverable of the project. It doesn’t do what you think it does. It’s designed for the needs of developers, not packagers. On a typical build farm for a distribution, tests that exercise timeouts will fail randomly. Indeed, the test suite is optimized for running very fast, with a tolerable level of flakiness, on a high-end laptop without noisy neighbors. This isn’t your context. “””
This feels like it will be too flaky for the autobuilder, even if we remove tests which have tight timeouts.
Ross
[1] https://github.com/python-websockets/websockets/issues/1739#issuecomment-5016084799
[2] https://websockets.readthedocs.io/en/stable/project/contributing.html#packaging
Re: [OE-core] [PATCH v2 4/5] python3-websockets: enable ptest; use git fetcher
Quoted 12 lines · Ross Burton
Quoted 6 lines · Tim Orling via openembedded-core
The PyPI sdist prunes tests/, so fetch the 17.1 tag from git. This re-enables ptest, reverted in
a0488f2e1dwhen the sdist dropped the tests.Upstream advises packagers against running the suite because timeout tests can flake on slow build farms; under ptest it runs on the target, and it passed repeatedly on qemux86-64.
Whilst I approve of ptests in general, I think this one will be a cause of pain.
Tests are not shipped in the sdists on purpose[1], and upstream is very clear that the tests are not for packagers[2]:
Quoted 7 lines
“”"
If you’re packaging websockets for a distribution, you must use releases published on PyPI as input. You may check SLSA attestations on GitHub.
You mustn’t rely on the git repository as input. Specifically, you mustn’t attempt to run the main test suite. It isn’t treated as a deliverable of the project. It doesn’t do what you think it does. It’s designed for the needs of developers, not packagers. On a typical build farm for a distribution, tests that exercise timeouts will fail randomly. Indeed, the test suite is optimized for running very fast, with a tolerable level of flakiness, on a high-end laptop without noisy neighbors. This isn’t your context. “””This feels like it will be too flaky for the autobuilder, even if we remove tests which have tight timeouts.
As much as I want ptest to feel comfortable with updates, I cannot deny your conclusions.
I am abandoning this series.
--Tim
PATCH v2 5/5 python3-websockets: upgrade 17.1 -> 17.4
In reply to [email protected]From: Tim Orling <[email protected]>
17.4 fixes a denial of service by memory exhaustion: recv() now rejects fragmented messages split into more than 4096 frames (tunable via WEBSOCKETS_MAX_FRAGMENTS). 17.2 and 17.3 are bug fix releases.
17.3 added uvloop variants of the asyncio tests, so add python3-uvloop to the ptest dependencies.
https://websockets.readthedocs.io/en/stable/project/changelog.html
https://github.com/python-websockets/websockets/compare/17.1...17.4
Tested with core-image-ptest-python3-websockets on qemux86-64 and qemuriscv64.
AI-Generated: Uses Claude Code (Claude Opus 5.5)
---
Changes in v2:
- Drop the test counts from the commit message
.../{python3-websockets_17.1.bb => python3-websockets_17.4.bb} | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
rename meta/recipes-devtools/python/{python3-websockets_17.1.bb => python3-websockets_17.4.bb} (89%)meta/recipes-devtools/python/python3-websockets_17.4.bb renamed from meta/recipes-devtools/python/python3-websockets_17.1.bb +2 -1
@@ -9,7 +9,7 @@ SRC_URI = "\ git://github.com/python-websockets/websockets;branch=main;protocol=https;tag=${PV} \ file://run-ptest \ " -SRCREV = "e87ea9be0373edd5065b5e94dfa714cfde23023b" +SRCREV = "625a59ed613ac60e60d577dd64b8641d59ecb2b1" CVE_PRODUCT = "websockets_project:websockets"
@@ -23,4 +23,5 @@ RDEPENDS:${PN} = " \ RDEPENDS:${PN}-ptest += "\ python3-misc \ + python3-uvloop \ "
Signature · 1 line
2.47.3