From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id aHYdD+1pemo1yhsAWB0awg (envelope-from ) for ; Mon, 10 Aug 2026 20:16:45 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=TVGoTB5o; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 2AE3D1E09B; Mon, 10 Aug 2026 20:16:45 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED 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 375071E09B for ; Mon, 10 Aug 2026 20:16:43 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B109C4BB3BC2 for ; Tue, 11 Aug 2026 00:16:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B109C4BB3BC2 Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=TVGoTB5o Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id 07C124BA23EA for ; Tue, 11 Aug 2026 00:16:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 07C124BA23EA Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 07C124BA23EA Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786407376; cv=none; b=wFCAUMRmukNJ8qSX8fEd8/LX6g+edaqPPuxi50YNx8wSAOKmtYbwqla97eM2/S5Pl/wVstilCmwJdupTzK2uMnSWNvqwJZB/WD9E5Fs5+C1Rous5llKRJluwCLhhzAJSyM8G/hjGZNFu5e++i4pN6ABn3fkNUJld5K7pIvVu+8k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786407376; c=relaxed/simple; bh=cLHN0CNOyouolcFykq718QmJ4cFC+VloSXJYiIaAigU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=mgU81YsSW74HnJUmDKDLte4FPPfsjxdVNwwD7NQFznzbaahczniKsyBdwgTAvSEunKgZ4FhkzU/pgcD2bvqkZwWOgl5Nbn4LLxeRQUH2+6XyRFA8SbZbbfOc0uIpIIcEVktQlW6hXPr6EWKzgKh+QddL0S2T8i17eTujIeimdG0= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=TVGoTB5o reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 07C124BA23EA Received: from eig-obgw-5003b.ext.cloudfilter.net ([10.0.29.155]) by cmsmtp with ESMTPS id tTM3wefZIv0ndtaAAw7UwX; Tue, 11 Aug 2026 00:16:14 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id taA9w7Pk1R2QytaA9wbjIu; Tue, 11 Aug 2026 00:16:13 +0000 X-Authority-Analysis: v=2.4 cv=fI053Yae c=1 sm=1 tr=0 ts=6a7a69cd a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Sv0fKeRqtYgA:10 a=ItBw4LHWJt0A:10 a=20KFwNOVAAAA:8 a=anKBRs1Okl4-EkLe_EoA:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=a2sbrl0Frwbn+RowMfCkutOZiPjZkvVuCs9/m5P9ReI=; b=TVGoTB5oKg2ocZhmRLXzKsOgND IHfOBBaG1Qso1BfEn2I6cWrVBoRRWYcdb9qMi9fqs04wAs5WkpCfM/jey3Sbpt5RfmAh31XdYdx6u FzPsrjYKnLLkzFfT4LkVFLP9O; Received: from 75-166-225-82.hlrn.qwest.net ([75.166.225.82]:48148 helo=prentzel) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1wtaA8-0000000310p-3d36; Mon, 10 Aug 2026 18:16:12 -0600 From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH] Use Python safety API in py-symbol.c In-Reply-To: <87cxvqkk2n.fsf@redhat.com> (Andrew Burgess's message of "Mon, 10 Aug 2026 17:37:52 +0100") References: <20260809182352.959293-1-tom@tromey.com> <87cxvqkk2n.fsf@redhat.com> X-Attribution: Tom Date: Mon, 10 Aug 2026 18:16:11 -0600 Message-ID: <871pc58qb8.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.225.82 X-Source-L: No X-Exim-ID: 1wtaA8-0000000310p-3d36 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-225-82.hlrn.qwest.net (prentzel) [75.166.225.82]:48148 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfKcOeddbVWV2+pRnQYM8ZPovnB4/zDaDv8uSyMNp58mFaWqnptgg/UDbMCi3KWhwvJVeGaX1Cdk4inIiTdeg2ujVTRCvKjEhJyZkcq9Casq54NaxtUbB IAAFGj2ItVasjYYMjPnPHyYTppmHFA2aniug5fX0hCD0g3+MTl11nBg6nre+BP3u1JI9gXV14AgRq6gjfuDcuLwqqACYRjfLOpY= 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 >>>>> "Andrew" == Andrew Burgess writes: >> +/* Normally gdb requires that if a method accepts multiple arguments, >> + then it should also accept keywords. However, there are some >> + exceptions to this rule. These exceptions should use this wrapper. >> + This should be used sparingly. >> + >> + A typical exception is something that takes an optional argument. >> + So, it may call PyArg_ParseTuple with "|s" or the like. Andrew> Would it not be better to just update the function in question to accept Andrew> keyword arguments? I know some people dislike using them on single Andrew> argument functions, but surely from the GDB side, supporting them is Andrew> pretty cheap, then it's up to the user if they want to use them or not? I didn't do it in this patch because it is (or eventually would be) a policy change. FWIW an additional drawback is that means that the argument name is also now part of the API. Anyway I don't mind doing it. The drawbacks seem reasonably minor. FWIW I count 32 such functions existing now, which is more than I thought existed. So I guess another option would be to just drop the "sparingly" text. Tom