From nobody Sun Nov 15 21:46:22 2026 X-Original-To: python@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4jSPhH0HK5z71DnD for ; Sun, 15 Nov 2026 21:46:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jSPhG6rftz4L4D for ; Sun, 15 Nov 2026 21:46:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794779183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vUtsG8W/JQCY8QBo/bh07ubRkofo84TS8y95oWMEhlc=; b=DELRy8F19eSGpRs+h1yrjTf5XnOshoCB4zfwmhWvcwLxi3YguQfEpwVFW9anjTU1nJ66Dj y2F/jk9PzA0rKGbNaCWF2ul/Nu/NMQyOioFvEsJxG95Qjch1j84qFA7TaWn1PmTWkekFAX b4j8aQZV5G8uvmDO2nVYnW80URoBppMsVNSLxNvV/jWZTtonrFRnSFWG2RiCLNIyiVjSHh dF8l/LMNKhMsXOJVbIfvCT53VR51ZP4ZwaLOJI3wqNg5/FP9HZUVLJxabv8UfrbKSTX2E8 9h/sZEMhPrYfNoT0o9L54mWarOs+jyWj6F6k3ia+5RZyJD1lxTqD+5fwXiqmgQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794779183; b=pW3O0tBQ97RSpKl+3ujbYcN/VQ/NOxjUtfLcJf2I4GK9bjXd1t2CtC65UW0t2swf4NaawJ ZmzjEl9we3Kxs2C2+edn23lV9WVXthlEOxCnxGTD3pzcqiUWUt0MLvLuOuY5vu2cRsS2t3 +IQmDctFQ5N2syl+iQrLLtbhLLNPCYgk6HpQm6Zh3BVdCR4iYY8INAv3LdmxEwLfXTxzmS Tgj5kvZVcMVYBMXCOEZ0l2K6ncuXVzptfVovBWymJEZdvTARD3N0BMmrfPbTxfq5m605bD RlHlI0hNjkJ3xDwpLRTxdwBDU4+985GxhfmlurDOhhm5uELT1Q0mD6qIx1gi/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794779183; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vUtsG8W/JQCY8QBo/bh07ubRkofo84TS8y95oWMEhlc=; b=SxPHHZaXTmE7GBvScsk7k3Gvi0uE6KXK4RHyy1Lyl8ToOw09zde7Rr6BE7nuO9FWA3dnzd hFG+Krb9EDwA6nY+hng/FV+Yq80/RuDCK3PRqX7n8xd5MRxU2OD5RR+RGL9NdbURnFUHUS zr2PBA+EATdySXqmxbD2dTxXsxwNOZnZ5HE6ww0Ili7pq2AIT9Sx5Ugovj3sMowWd5ZCUR /DQHSKy5BmWhY+rK/3Pe1vHH1uz7disW6nV26j1YcGEXoEGy5w/Ikat5PCEy8wyLFBuK1c RATdDno7IKdQLEQLjSQ3ARuo/lWPSGYK4/VN0yEA7tP5qrCUYv4I5qE3tQrm1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4jSPhG6VqdzPNC for ; Sun, 15 Nov 2026 21:46:22 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 6AFLkMLg070355 for ; Sun, 15 Nov 2026 21:46:22 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 6AFLkMd3070354 for python@FreeBSD.org; Sun, 15 Nov 2026 21:46:22 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: maintainer-feedback requested: [Bug 300806] lang/python3*: unconditionally install CPython's test modules, bloating packages by over half their installed size Date: Sun, 15 Nov 2026 21:46:22 +0000 X-Bugzilla-Type: request X-Bugzilla-Product: Ports & Packages X-Bugzilla-Component: Individual Port(s) X-Bugzilla-Version: Latest X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: python@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? Message-ID: In-Reply-To: References: X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Archive: https://lists.freebsd.org/archives/freebsd-python X-BeenThere: freebsd-python@freebsd.org List-Id: FreeBSD-specific Python issues List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Bugzilla Automation has asked freebsd-python (Nobody) for maintainer-feedback: Bug 300806: lang/python3*: unconditionally install CPython's test modules, bloating packages by over half their installed size https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D300806 --- Description --- lang/python312 (and likely python311/313/314/315 and their free-threaded variants python313t/python314t) currently install the entire CPython stdlib test suite unconditionally, with no way to opt out: - Lib/test/ and idlelib/idle_test/ (pure Python) - 10 C extension modules built specifically for the test suite: _testcapi, _testbuffer, _testclinic, _testimportmultiple, _testinternalcapi, _testmultiphase, _testsinglephase, _xxtestfuzz, _ctypes_test, xxsubtype On lang/python312 this is ~4900 of ~8000 pkg-plist entries (over 60%), and measured via pkg delete's "operation will free" size: 220 MiB installed with the test modules vs. 95 MiB without =E2=80=94 i.e. ~125 MiB (57%) of the installed package is test-only content most users never touch. Upstream CPython's configure has supported --disable-test-modules since 3.10 (bpo-45416 / GH-28755) specifically so distributors can skip installing the test suite for end users. None of the lang/python3* ports pass this flag to= day. Proposed fix (implemented and verified for python312 so far): Add a new TEST port option (default off) that: - wires --enable-test-modules/--disable-test-modules via TEST_CONFIGURE_ENABLE=3Dtest-modules - gates the build-time self-test run (TEST_TARGET=3Dbuildbottest) behind th= e same option, so make test stays opt-in rather than always-on - tags the affected pkg-plist entries with %%TEST%% Verified on lang/python312 via poudriere: stage-qa/check-plist passes with = TEST both on and off, and make test (TEST enabled) passes with only the usual expected flaky/skip failures CPython's own suite has on FreeBSD. Plan is to extend the same fix to python311, python313, python314, python31= 5, and the free-threaded 313t/314t variants (which inherit most settings via MASTERDIR) once each is independently verified, since the exact set of gated .so modules may differ slightly per release. Patch for lang/python312 to follow as an attachment.