diff mbox series

[meta-python,10/12] python3-gunicorn: add python3-multiprocessing to ptest RDEPENDS

Message ID 20260816232358.1947922-10-khem.raj@oss.qualcomm.com
State New
Headers show
Series [meta-python,01/12] python3-cbor2: add tzdata/zoneinfo RDEPENDS for ptest | expand

Commit Message

Khem Raj Aug. 16, 2026, 11:23 p.m. UTC
From: Khem Raj <raj.khem@gmail.com>

gevent.monkey.patch_all() internally does "import multiprocessing"
during _gevent_did_monkey_patch (gevent/subprocess.py); without
python3-multiprocessing installed this raises ModuleNotFoundError,
crashing any gunicorn gevent-worker boot. Explains both the direct
import-order test failures and the ConnectionResetError seen in the
control-socket integration tests, since the worker process crashes
mid-boot in both cases.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 .../python/python3-gunicorn_26.0.0.bb                | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox series

Patch

diff --git a/meta-python/recipes-devtools/python/python3-gunicorn_26.0.0.bb b/meta-python/recipes-devtools/python/python3-gunicorn_26.0.0.bb
index 449c9685ca..575e8a66e1 100644
--- a/meta-python/recipes-devtools/python/python3-gunicorn_26.0.0.bb
+++ b/meta-python/recipes-devtools/python/python3-gunicorn_26.0.0.bb
@@ -19,13 +19,25 @@  RDEPENDS:${PN}-ptest += " \
     python3-eventlet \
     python3-gevent \
     python3-misc \
+    python3-multiprocessing \
     python3-pytest \
+    python3-pytest-asyncio \
     python3-unittest-automake-output \
 "
 
 do_install_ptest() {
 	install -d ${D}${PTEST_PATH}/tests
 	cp -rf ${S}/tests/* ${D}${PTEST_PATH}/tests/
+	# tests/docker/* are docker-compose/Dockerfile-driven integration tests
+	# requiring a Docker daemon, which the ptest QEMU environment doesn't have
+	rm -rf ${D}${PTEST_PATH}/tests/docker
+	# upstream's pyproject.toml sets asyncio_mode=auto for the async tests
+	# under tests/dirty and tests/ctl; provide just that bit without pulling
+	# in the rest of upstream's addopts (e.g. --cov=gunicorn)
+	cat > ${D}${PTEST_PATH}/pytest.ini <<EOF
+[pytest]
+asyncio_mode = auto
+EOF
 }
 
 RDEPENDS:${PN} += "python3-setuptools python3-fcntl"