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 4jSPhH3jKXz71Dwj 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 4jSPhH2ldVz4L9v for ; Sun, 15 Nov 2026 21:46:23 +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; bh=FHJWmbNRm8+XQoT08fzEepVA77K1adoLM9q1gcwxslo=; b=qZcje1e6L5vo+X76SpCHxkgwZNCC84u8hAYcnCDfAGEMlwSPNXfFpo5W13LU2Vq1V5JVN3 zZ8Olo3Kj+ZzTDuI9guYvr9PDXY59eldpuu1JCzbuX+mwvfkjlbLM3dx5ALaV0CgB0H7pj GyBPZwFINJydd3I4GI1nrMWHhH7ZtuQYis4zs4La4YGn8Im1lX0WZnYgP32ILXmQ/hwodY Dxdqs8Qd8AFWmjB9cEX8YW+x2o4Ml9r0O08fjZEFDWyK3Fz7NAHot+8/5Ao9QyHxnQ4uAO 83hpUaATbXmpK8B4LY3IdgfdaQW1WTW5e24jXt0sTiMWKnz2+9AIpOXP7i9Ggg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794779183; b=uwHtENUPgIhHimeZqB5acKhgacWT08eJazk6cE7A3OZoeuqIXOTwxsOzxnrQVdV3nCc93a oD4F19QQfmiC9LH5PqsW/9cpVQdtMZAEbfbiqZq2ZdBkrqgTJ5THqHyvydntZpsidInTRl 1T8EKG6B19ki6H6K+XFW45p61i8N8a59KabGl2rBpdYOCluowj0nukYPcfoW0HHfoQZj/6 sQK9zOI2ExZKXvqvpZhLFMKrdI/Iz3m7PfHva0z295gfXXfKQgtC6MqFOdwz6A2RXSBNUU epWVbRLNIdRLVOZ3Lr4xEDmixxB5QiB3gJE+bhHsUIibhQE0A6tX3d6QXm7xyQ== 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; bh=FHJWmbNRm8+XQoT08fzEepVA77K1adoLM9q1gcwxslo=; b=bufanH2SGS/7d40NDvCweNhHn2ZKO0BAPgFluY36isl2TLyq6xtdz/nLJryfDeeTjosDgA pUewgDiJ9t+c9AQRWu/4CXMoQd1y3ZxD+aoEBhtr8Z41r1fjQrMmdQjTdYP15VPWvPC2ev N3asITG3FVl4c5/G70gu9Xxywx918CXw2PvR4Tp5NnQsi+HZ8XP6i8RM1IlX5fF8368E0R glRYvjRnPHq1FHM5pUF/NgY4bXc1+0cTMpqi4TxO/radFPu4Xkgb+BS2hyztkofpHhjCsL acPNpSd9qOLUrXogZkZCoCluupVNVO3f4BApDYNSBd1mf40jmq/CDswfqF3c9w== 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 4jSPhH29N6zP84 for ; Sun, 15 Nov 2026 21:46:23 +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 6AFLkNSb070368 for ; Sun, 15 Nov 2026 21:46:23 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 6AFLkN9J070367 for python@FreeBSD.org; Sun, 15 Nov 2026 21:46:23 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: python@FreeBSD.org Subject: [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-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None 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: michaelo@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: python@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter flagtypes.name Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" 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 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D300806 Bug ID: 300806 Summary: lang/python3*: unconditionally install CPython's test modules, bloating packages by over half their installed size Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: python@FreeBSD.org Reporter: michaelo@FreeBSD.org Flags: maintainer-feedback?(python@FreeBSD.org) Assignee: python@FreeBSD.org 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. --=20 You are receiving this mail because: You are the assignee for the bug.=