From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id lIqAIvW74mgUmiAAWB0awg (envelope-from ) for ; Sun, 05 Oct 2025 14:41:57 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=nk6dlmqd; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RtnmE7mg; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=nk6dlmqd; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RtnmE7mg; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 7BDE61E047; Sun, 05 Oct 2025 14:41:57 -0400 (EDT) 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 server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (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 942231E047 for ; Sun, 05 Oct 2025 14:41:56 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 2A4BB3858D3C for ; Sun, 5 Oct 2025 18:41:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2A4BB3858D3C Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=nk6dlmqd; dkim=pass header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RtnmE7mg; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.a=rsa-sha256 header.s=susede2_rsa header.b=nk6dlmqd; dkim=neutral header.d=suse.de header.i=@suse.de header.a=ed25519-sha256 header.s=susede2_ed25519 header.b=RtnmE7mg Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by sourceware.org (Postfix) with ESMTPS id 51BEE3858D1E for ; Sun, 5 Oct 2025 18:41:21 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 51BEE3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 51BEE3858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759689681; cv=none; b=Hlb6oS67NzkYW6zHWF7M7JpPtjubdIU8P5LIqMZaQS452KhDOKNrg4TSlf3tOvCANqaH84dqd/jmlblUGBEei52kVaW/wEUEaeA0yrauDYgqGc5hNCS8gbvDZNBDuLhfinbNGXariHLfOD8CCoSUD7iOhlEFMoKKBN3NRHABSXc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1759689681; c=relaxed/simple; bh=9mpDZHjrReNT+XZZ0NasdO0Hxgl7ZKY2LUFh0fr9EEI=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature: Message-ID:Date:MIME-Version:Subject:To:From; b=k7hopc9lw4xT4OBWSO4z8/V3cbBoWjAMIzsEf8JTbXIPJWRT7xxO/p5S0OvpibaflHSFkoc2leXEjUDivvOW3LENymkG77GLZdkSNy5LU5j0xO3usXsvLeVAWm1iWvVO+pCoczRvA74Abf/WnmIrAVOjtaknPd9IG5TSlceWJF4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 51BEE3858D1E Received: from imap1.dmz-prg2.suse.org (unknown [10.150.64.97]) (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 smtp-out2.suse.de (Postfix) with ESMTPS id 404941FDB5; Sun, 5 Oct 2025 18:41:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1759689680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ynh5rLzuZkDUz7qZlWTXHb8TZgFigMyB9iy4yfb/m9g=; b=nk6dlmqd8gKzCGifWNdcuppKthbJzk/tnXD9cbXDahYeao4344E9G7wSEubBT/ZV1clohm 3ZIt3UcfQEA+tvQ+syfr9VeOgAtQYJvIkQvejTmm979simIpQlHZwJ/LVONsceq7qb5pHK 01Lkn6qQv6h8dMsHrTFr4mdJ/CBn9v4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1759689680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ynh5rLzuZkDUz7qZlWTXHb8TZgFigMyB9iy4yfb/m9g=; b=RtnmE7mgYMHi8mwejqV/W2Yr6TNMNRsQH2s7hU2064XCBuZM5fs7mrQa7I6sK2/oGMIxXZ iFsJo2RunQAZcpAg== Authentication-Results: smtp-out2.suse.de; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1759689680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ynh5rLzuZkDUz7qZlWTXHb8TZgFigMyB9iy4yfb/m9g=; b=nk6dlmqd8gKzCGifWNdcuppKthbJzk/tnXD9cbXDahYeao4344E9G7wSEubBT/ZV1clohm 3ZIt3UcfQEA+tvQ+syfr9VeOgAtQYJvIkQvejTmm979simIpQlHZwJ/LVONsceq7qb5pHK 01Lkn6qQv6h8dMsHrTFr4mdJ/CBn9v4= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1759689680; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Ynh5rLzuZkDUz7qZlWTXHb8TZgFigMyB9iy4yfb/m9g=; b=RtnmE7mgYMHi8mwejqV/W2Yr6TNMNRsQH2s7hU2064XCBuZM5fs7mrQa7I6sK2/oGMIxXZ iFsJo2RunQAZcpAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (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 imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 22CE313995; Sun, 5 Oct 2025 18:41:20 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id PnMXB9C74miidAAAD6G6ig (envelope-from ); Sun, 05 Oct 2025 18:41:20 +0000 Message-ID: Date: Sun, 5 Oct 2025 20:41:25 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCHv9 0/3] new gdb.Style API To: Andrew Burgess , Tom Tromey Cc: gdb-patches@sourceware.org References: <878qhr7pm5.fsf@tromey.com> <87y0pp7br2.fsf@redhat.com> <8ca0db41-c3a2-4192-b279-88d18e34fbd4@suse.de> <87v7kt6xa5.fsf@redhat.com> Content-Language: en-US From: Tom de Vries In-Reply-To: <87v7kt6xa5.fsf@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spamd-Result: default: False [-4.30 / 50.00]; BAYES_HAM(-3.00)[100.00%]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.20)[-0.998]; MIME_GOOD(-0.10)[text/plain]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RCVD_VIA_SMTP_AUTH(0.00)[]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; FROM_EQ_ENVFROM(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:helo, suse.de:mid, suse.de:email] 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 On 10/5/25 20:03, Andrew Burgess wrote: > Tom de Vries writes: > >> On 10/5/25 14:51, Andrew Burgess wrote: >>> Tom Tromey writes: >>> >>>>>>>>> "Andrew" == Andrew Burgess writes: >>>> >>>> [...] >>>> Andrew> In v9: >>>> >>>> Going for a record here. >>>> >>>> I think these are ok. Thanks for doing this. >>>> Approved-By: Tom Tromey >>> >>> Pushed. >> >> Hi, >> >> I'm running into pre-commit failures: > > I searched on the GDB wiki, and did a grep in gdb/ and gdb/doc/ but > could find nothing about "pre-commit" except for one comment in > check-include-guards.py, but that doesn't say what "pre-commit" is. > > Is this process documented somewhere else? Or have I just failed at > finding it? > Hi Andrew, AFAIK there's not really a process, that is, there's no formal agreement on a requirement to run it. [ See also this email thread ( https://sourceware.org/pipermail/gdb-patches/2025-October/221320.html ) on the status of tclint as pre-commit hook. ] There's a file called .pre-commit-config.yaml in the root dir of the repository. I have added some information in there on how to install pre-commit, and how to skip some/all checks. Thanks, - Tom >> ... >> flake8...................................................................Failed >> - hook id: flake8 >> - duration: 0.25s >> - exit code: 1 >> >> gdb/python/lib/gdb/__init__.py:557:31: F405 'Parameter' may be >> undefined, or defined from star imports: _gdb >> gdb/python/lib/gdb/__init__.py:579:21: F405 'COMMAND_NONE' may be >> undefined, or defined from star imports: _gdb >> gdb/python/lib/gdb/__init__.py:612:21: F405 'Color' may be undefined, or >> defined from star imports: _gdb >> gdb/python/lib/gdb/__init__.py:613:21: F405 'PARAM_COLOR' may be >> undefined, or defined from star imports: _gdb >> ... > > The patch below doesn't break GDB's Python support. And based on the > existing code comments, I suspect this is the required fix. But I > haven't run the "pre-commit" tests (see comments above), so you might > one to check this fixes the issue you reported. > > Thanks, > Andrew > > --- > > commit 5812afb15e8b7774984c238eb67adcf6eaa704a9 > Author: Andrew Burgess > Date: Sun Oct 5 18:55:33 2025 +0100 > > gdb/python: fix some flake8 warnings related to Python code > > After these commits: > > * 49e4d0cdca3 gdb/python: add gdb.Style class > * d5214580a5f gdb/python: new class gdb.StyleParameterSet > * 3c724596812 gdb/python: extend gdb.write to support styled output > > the following issues were pointed out on the mailing list: > > I'm running into pre-commit failures: > ... > flake8...................................................................Failed > - hook id: flake8 > - duration: 0.25s > - exit code: 1 > > gdb/python/lib/gdb/__init__.py:557:31: F405 'Parameter' may be undefined, or defined from star imports: _gdb > gdb/python/lib/gdb/__init__.py:579:21: F405 'COMMAND_NONE' may be undefined, or defined from star imports: _gdb > gdb/python/lib/gdb/__init__.py:612:21: F405 'Color' may be undefined, or defined from star imports: _gdb > gdb/python/lib/gdb/__init__.py:613:21: F405 'PARAM_COLOR' may be undefined, or defined from star imports: _gdb > > I believe this patch should resolve these issues. > > diff --git a/gdb/python/lib/gdb/__init__.py b/gdb/python/lib/gdb/__init__.py > index 0388c6a2c00..65f76988925 100644 > --- a/gdb/python/lib/gdb/__init__.py > +++ b/gdb/python/lib/gdb/__init__.py > @@ -34,6 +34,10 @@ from _gdb import ( > parameter, > selected_inferior, > write, > + Parameter, > + COMMAND_NONE, > + Color, > + PARAM_COLOR, > ) > > # isort: split >