From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id dWo0Of+HXmkA/DAAWB0awg (envelope-from ) for ; Wed, 07 Jan 2026 11:21:19 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=M6cmQINQ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=M6cmQINQ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D78A01E0B6; Wed, 07 Jan 2026 11:21:19 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 3DB051E08D for ; Wed, 07 Jan 2026 11:21:18 -0500 (EST) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 9F8CF4BA2E2F for ; Wed, 7 Jan 2026 16:21:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9F8CF4BA2E2F Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=M6cmQINQ; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=M6cmQINQ Received: from MRWPR03CU001.outbound.protection.outlook.com (mail-francesouthazon11011045.outbound.protection.outlook.com [40.107.130.45]) by sourceware.org (Postfix) with ESMTPS id F16704BA2E04 for ; Wed, 7 Jan 2026 16:20:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F16704BA2E04 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org F16704BA2E04 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.107.130.45 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1767802815; cv=pass; b=aoJz3cWQnjQcI5uS7XKswyUwzH32YiuXzSQRqQoQyPLU73Uy7w6ZWyGA9d06lBPj1VLWcGr8H8tPc4cc26Cv26Kujjj30sQBXJ8iGYamVa/Gi8OwtC/jMh3YdSZ0w3LcEyDFFgiGHgNbU+So0eFRpphtxis93DHq/OSto0dEvro= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1767802815; c=relaxed/simple; bh=bqyN4xqIHrGaTeHT3aCLv8UrYwkUmHpVdqZGoQA6Ke4=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=vB/HdcFAwedZOqrn8drtFFw+RZLibbHKs/6bOL+lvdaYPW51o2Cek1pwQHWTIW8RXLQ90IjWunEILct2qDKmLoGPAX6MbAOo5srAJiyJ2TZN2TjVdsEs9LhQRjxwKQZnGWeToomus7T28QMbZ2AIfWbgd92qazHNGuami0uj/08= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F16704BA2E04 ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=w8lKgnIsHoUfNARZeO5c5igZtr/NLQiDLcu6QQ7szqivtg0MPsfEZ5tsM6NolF4dMFI+sPq19E9n3yMTT5Y6XXMOp+fB2H1GKVeoJtvNSx3FsJHxEWiSVkRLuu1BCP9haJq8NLsHWtTPkVsDmbQeVboTO3hGLzXvoPzOjRsiVah7rjMzB1hC1GxFf1uqpgRHnf7X/kcUB4fOFFoIamWD9l/IgUfuOMzOlQpHhIWC4RYjdkoIGSZswmyXwm0BdEpMdV8oG1Bk1c7y8R1RN774Y7OEW3xH3nPhH48hE/72/2H1EsNdPlUu+GcxmyrgjIDIm6vMnB6gSb0+98n60oxm8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vTs7gQjeN7Ekpz8T0OXjWILzVXSLECndSKvb5FeGYUU=; b=mUMWQJ1pTUJyIlQ7TkNSIkKRS2pIVggQB/ymLlNbyFItIORhPaMGPg0qfZlL78R7Ec7CtEJIdW0Ot3ItIuc7X8cQdGBiAVlTjgSciwm5reUL5PNMHWc2Hc3i955yjZ4oOmTrGIyuhLWhqCu9sAxdAjHfxSItbLeUKo0bX1P6poCsbogTFlSFHKNEtvCOtd51Hv1jwdG7Q9qOU7HGCTwqXTSIJI9yRVa6s2TfJ1fGVWAIbWiEedDZyHjAA5l+IkoicC3ch1ZleUBHXe8tO+EaqXRLRKXtVen9dz4KsAOaLbnyMzl+49vOI9EtPM+DKaCNqUsWhcL0AZ3xfszSsz31Ew== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vTs7gQjeN7Ekpz8T0OXjWILzVXSLECndSKvb5FeGYUU=; b=M6cmQINQB54xRdYH8uuWrFtsvnhqSyUi3DbuYZ2aaqIQc7aJeXFDd4jDTNmd/BGhN+2c6xTTKoxHM5AzTXVvxShJ1oc5p5bDNcMfGN/1TNXYZB6w7QYs4UB/VajUiO1lO9mc4+kstXzx6raQcf/7yGmRHJwgAYz96Rq8kPooADo= Received: from AS4P189CA0062.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:659::9) by DB9PR08MB7867.eurprd08.prod.outlook.com (2603:10a6:10:39e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9499.2; Wed, 7 Jan 2026 16:20:03 +0000 Received: from AMS0EPF0000019B.eurprd05.prod.outlook.com (2603:10a6:20b:659:cafe::77) by AS4P189CA0062.outlook.office365.com (2603:10a6:20b:659::9) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9499.2 via Frontend Transport; Wed, 7 Jan 2026 16:20:03 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by AMS0EPF0000019B.mail.protection.outlook.com (10.167.16.247) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9499.1 via Frontend Transport; Wed, 7 Jan 2026 16:20:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qGb6E5WqaKDCEv58NobvWlEK5TWw6XeVWApuzLJo6pjo1dHDTdmM0aUKj/Eb/53frvvNoKZIbO7zM6zKIRMOoSP1csLRSGjsQ6cgi8tNnBEHfGnw3jkesNNUJhITlzkFBarvNkmDV7CizaXgh+WDd+l5x17Obpw8biO2nDQi0DnMVc1Y7ZR0wSQzMcsD+trm55uPbYzNliXRRPavaR/6KMmuztS80z2WZKEuCFSzAn/0/Tr8EI58yyiNcY9z/YltoDDPbcmbHyP4styTEkrAZbtILuMqpP/OMNXqMwkP3jRX0faaxX3mvzYeIH6IUxtTN7Rs73d0C0vu26DXeKNEBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vTs7gQjeN7Ekpz8T0OXjWILzVXSLECndSKvb5FeGYUU=; b=LJpXGv1VVPSmcHbLdl6jSdbbw9wZ3oYWyhpnH3XJDuOlvoGCA06U9MjIgyqGA3SciuHLMiRw8Pta/c21EMPVtCKYwWuszyjvk6VyfHYeAqe+78cXfHa16tyBtkPLbYUOK1y6RseV2UP0Bs+Pu7IgyIzL1pOEd2Sk/zsDCs2TA1xJoQBk7xLaTHESBmRiY3J2tefJoCzvDB7wYoVLn7nVA8JNYnAAALxi2pRZ0xJSHNRpPkKKq4I9YLD5sHL7ZDXRaX8ALWam8A9L91qWfjKp3BD10UC0joreFfLd5CNAdmTH5Z/6HJrVlriMtv1PzhzxWDOnM9hUxzCBhfRUCA/9sQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vTs7gQjeN7Ekpz8T0OXjWILzVXSLECndSKvb5FeGYUU=; b=M6cmQINQB54xRdYH8uuWrFtsvnhqSyUi3DbuYZ2aaqIQc7aJeXFDd4jDTNmd/BGhN+2c6xTTKoxHM5AzTXVvxShJ1oc5p5bDNcMfGN/1TNXYZB6w7QYs4UB/VajUiO1lO9mc4+kstXzx6raQcf/7yGmRHJwgAYz96Rq8kPooADo= Received: from DU7P251CA0011.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:551::13) by DU0PR08MB9873.eurprd08.prod.outlook.com (2603:10a6:10:421::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9478.5; Wed, 7 Jan 2026 16:18:59 +0000 Received: from DU6PEPF0000A7E1.eurprd02.prod.outlook.com (2603:10a6:10:551:cafe::a1) by DU7P251CA0011.outlook.office365.com (2603:10a6:10:551::13) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9499.2 via Frontend Transport; Wed, 7 Jan 2026 16:18:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by DU6PEPF0000A7E1.mail.protection.outlook.com (10.167.8.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9499.1 via Frontend Transport; Wed, 7 Jan 2026 16:18:59 +0000 Received: from AZ-NEU-EX03.Arm.com (10.240.25.137) by AZ-NEU-EX03.Arm.com (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Wed, 7 Jan 2026 16:18:56 +0000 Received: from PF4S4363.arm.com (10.57.12.84) by mail.arm.com (10.240.25.137) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Wed, 7 Jan 2026 16:18:56 +0000 From: Matthieu Longo To: CC: Tom Tromey , Andrew Burgess , Matthieu Longo Subject: [PATCH v1] py-gdb-readline: replace deprecated interfaces in GdbRemoveReadlineFinder Date: Wed, 7 Jan 2026 16:18:54 +0000 Message-ID: <20260107161854.1712307-1-matthieu.longo@arm.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DU6PEPF0000A7E1:EE_|DU0PR08MB9873:EE_|AMS0EPF0000019B:EE_|DB9PR08MB7867:EE_ X-MS-Office365-Filtering-Correlation-Id: 505aac93-e32f-4904-c8fc-08de4e089c8e x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|1800799024|82310400026|36860700013|13003099007; X-Microsoft-Antispam-Message-Info-Original: =?us-ascii?Q?tTjrPcyx5/jFIUKeAsu8M67Pq0TOkGO1egN/RdcurazMksDp2Szi0IxJMt0c?= =?us-ascii?Q?Om7qWKTIhCU02MHbTX7gClSTN5kQtD323YTiYlzsh+merbSoUshCsDjmS23V?= =?us-ascii?Q?U9pRWMw9n7NrMAkK8ZlMAYDNuGRWbSDtYEyh9AociOSkAAtn3BNkEIaI3gNI?= =?us-ascii?Q?D2lBP2ucybj5OvAbqTiuv670YIrY3tfSjCxuIqs290NmJ4rxbMuLsWRpJxqh?= =?us-ascii?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EaqiVwHO8WsDv8?= =?us-ascii?Q?9x7h8oOL2ahHwJ8LUgcirycFQy2WEcErqqL63nS5haIFcBowJ8FsZOfto+ua?= =?us-ascii?Q?TqozBWySEYX0jpq+8i8NBnw783I135OU8vg5BkdiiqzJ2bbtKPmiE0eyyFYx?= =?us-ascii?Q?AJvR1srGQSjBm98QGisDe469qwPWxFk34uKI07Xt0FAz0W1HTjXLh+W9MG1f?= =?us-ascii?Q?lhKMzIwshSp7xWXvvsNW3abvGXBb07IKLM4D9+Ln42uuCmYQ5n9zkbe703cB?= =?us-ascii?Q?XwRCUdUMnD0aeX/VERTpgubzB2XLAS6OStKGE38/l1mTPFycG3wkNZ2DdceT?= =?us-ascii?Q?/NfQ25JN4mtOBZltXrSTbR6Ie0Rukyo++Olven6jkJu7u61E7QxTKrapDHiz?= =?us-ascii?Q?CbBfNf6IrIAkuLYLGYsD/skyIhGk2WX4ofUAwYftnVuIR6VgKlEP5deeyHHv?= =?us-ascii?Q?9SDW1c2c7IEzKF6b0q6GvsKoa4fMeKqi4Jo2PnaW?= X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(1800799024)(82310400026)(36860700013)(13003099007); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU0PR08MB9873 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AMS0EPF0000019B.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b875554a-638f-4df3-0254-08de4e0876b6 X-Microsoft-Antispam: BCL:0; ARA:13230040|376014|14060799003|36860700013|82310400026|1800799024|35042699022|13003099007; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?vZuwqKam6NpCmHvz26vKLiflfa4revBDyzFdZAXebObzpo5c8z4V/yLTcoFG?= =?us-ascii?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Ebq+Z1C+XalrV8IBsvTKKXkkpk3?= =?us-ascii?Q?N3ziJaPGyq4RgJKHc1HAK/uYVuOsjx+jl30+55YO22qcKrSAcZY32Vflu/vH?= =?us-ascii?Q?HIMlBDOUMneyh6Y7VTW4AucTC4Q4ZXUn91S5P35Qb2//PnJOXtrW/AG6VJ5L?= =?us-ascii?Q?PDFlChxG5Plzy5+Emw40uGFD9NDJXk8hfNEZuhRd2hwiGEXFWBWi5QUlC9PM?= =?us-ascii?Q?JOmCfq+w6RTM4Tq3zZaLd/5VwrozC5s4A5+LVud8fZZnOJWI9pNnWZ2MHpKx?= =?us-ascii?Q?VdCheWsiX1vaC1YhV1PL2aNfHTpsuIYHE2dMt40YWB7hm64DgZU9Oq0/Vyzi?= =?us-ascii?Q?p5k578r+EvySlifkQsu82btzmmZbKDsX1kIA5im6PjwqG+xkM75tfllUcmQH?= =?us-ascii?Q?9bu4J3wyS01BHUv/MduY3ek2IFLvZNX7D86gGNyVj3SGCyymVoWqHd9CIEOq?= =?us-ascii?Q?pkQ/lEfjyr1kdRJBzG7piF70tJ/SFdY4+5PNsCFpVpP64B6Iqtz3qMsKPb/1?= =?us-ascii?Q?xOw19tB2BLLZ7EG9oaIKURG8SLiXYkn783WjLU59plOujDtlyYhOfAw7Lgvx?= =?us-ascii?Q?846TYM4Cv5CN/HSMgMAs53RYuP3ASDAQ0bxWjCSl+CHNKtz9XiL61jALQ3Gz?= =?us-ascii?Q?Z2dNW9YeCyvK+iELefdEGy7n5IzhzqO9N4yx1FBd?= X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(14060799003)(36860700013)(82310400026)(1800799024)(35042699022)(13003099007); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jan 2026 16:20:02.5609 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 505aac93-e32f-4904-c8fc-08de4e089c8e X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: AMS0EPF0000019B.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR08MB7867 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org A previous patch [1] enabled readline in Python in a GDB-specific way and blocked the standard Python readline module to prevent conflicts with GDB by adding a custom importer raising an exception for the readline module. This custom importer was written back in 2012 for old Python versions, and does not seem to work anymore with Python 3.x. find_module() and load_module() have been deprecated since Python 3.4, and the first one has been removed since 3.12, and the second will be removed in 3.15. The GDB testsuite does not cover this use case, and the removal of find_module() was not detected by the testsuite. This issue is tracked in bug 32473. importlib.abc.MetaPathFinder: find_module(fullname, path) Deprecated since version 3.4: Use find_spec() instead. Changed in version 3.10: Use of find_module() by the import system now raises ImportWarning. Changed in version 3.12: find_module() has been removed. Use find_spec() instead. find_spec(fullname, path, target=None) New in version 3.4, as a replacement for find_module. importlib.abc.Loader: load_module(fullname): Deprecated since version 3.4, will be removed in version 3.15 The recommended API for loading a module is exec_module() (and create_module()). This patch uses Patryk Sondej's approach detailed in bug 32473, but with a slight variation regarding the finder insertion in sys.meta_path. It also adds a new test to prevent future regression. [1]: 037bbc8eeaf8e6f3a5e185e78268aa71a1159ae7 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32473 --- gdb/python/py-gdb-readline.c | 27 ++++++++++++------- .../gdb.python/remove-readline-finder.exp | 27 +++++++++++++++++++ 2 files changed, 45 insertions(+), 9 deletions(-) create mode 100644 gdb/testsuite/gdb.python/remove-readline-finder.exp diff --git a/gdb/python/py-gdb-readline.c b/gdb/python/py-gdb-readline.c index 21503168725..9cb70bc3fcb 100644 --- a/gdb/python/py-gdb-readline.c +++ b/gdb/python/py-gdb-readline.c @@ -90,20 +90,29 @@ gdbpy_initialize_gdb_readline () GDB's readline should be implemented to replace Python's readline and prevent conflicts. For now, this file implements a sys.meta_path finder that simply fails to import the readline - module. */ + module. + + Notes: Python includes three default importers. As mentioned in the + documentation [1]: + - The first one knows how to locate built-in modules. + - The second one knows how to locate frozen modules. + - A third default finder searches an import path for modules. + [1]: https://docs.python.org/3/reference/import.html#finders-and-loaders + + The third default finder is the one that will load readline, so the custom + finder to disable the import of readline in GDB has to be placed before + this third default finder. */ if (PyRun_SimpleString ("\ import sys\n\ +from importlib.abc import MetaPathFinder\n\ \n\ -class GdbRemoveReadlineFinder:\n\ - def find_module(self, fullname, path=None):\n\ - if fullname == 'readline' and path is None:\n\ - return self\n\ - return None\n\ +class GdbRemoveReadlineFinder(MetaPathFinder):\n\ \n\ - def load_module(self, fullname):\n\ - raise ImportError('readline module disabled under GDB')\n\ + def find_spec(self, fullname, path=None, target=None):\n\ + if fullname == \"readline\":\n\ + raise ImportError(\"readline module disabled under GDB\")\n\ \n\ -sys.meta_path.append(GdbRemoveReadlineFinder())\n\ +sys.meta_path.insert(2, GdbRemoveReadlineFinder())\n\ ") == 0) PyOS_ReadlineFunctionPointer = gdbpy_readline_wrapper; diff --git a/gdb/testsuite/gdb.python/remove-readline-finder.exp b/gdb/testsuite/gdb.python/remove-readline-finder.exp new file mode 100644 index 00000000000..362e90e6b7c --- /dev/null +++ b/gdb/testsuite/gdb.python/remove-readline-finder.exp @@ -0,0 +1,27 @@ +# Copyright 2026 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Test that the readline module cannot be imported from GDB (PR 32473). + +load_lib gdb-python.exp + +require allow_python_tests + +standard_testfile + +clean_restart + +gdb_test "py import readline" \ + "Python Exception : readline module disabled under GDB\r\n.*" -- 2.52.0