From: Andrew Burgess <aburgess@redhat.com>
To: Tom de Vries <tdevries@suse.de>, Tom Tromey <tom@tromey.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCHv9 0/3] new gdb.Style API
Date: Sun, 05 Oct 2025 19:03:46 +0100 [thread overview]
Message-ID: <87v7kt6xa5.fsf@redhat.com> (raw)
In-Reply-To: <8ca0db41-c3a2-4192-b279-88d18e34fbd4@suse.de>
Tom de Vries <tdevries@suse.de> writes:
> On 10/5/25 14:51, Andrew Burgess wrote:
>> Tom Tromey <tom@tromey.com> writes:
>>
>>>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>>>
>>> [...]
>>> Andrew> In v9:
>>>
>>> Going for a record here.
>>>
>>> I think these are ok. Thanks for doing this.
>>> Approved-By: Tom Tromey <tom@tromey.com>
>>
>> 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?
> ...
> 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 <aburgess@redhat.com>
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
next prev parent reply other threads:[~2025-10-05 18:04 UTC|newest]
Thread overview: 61+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-04 9:39 [PATCH 0/2] Python Style API Andrew Burgess
2025-06-04 9:39 ` [PATCH 1/2] gdb/python: add gdb.Style class Andrew Burgess
2025-06-04 9:39 ` [PATCH 2/2] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-06-06 13:38 ` [PATCHv2 0/2] Python Style API Andrew Burgess
2025-06-06 13:38 ` [PATCHv2 1/2] gdb/python: add gdb.Style class Andrew Burgess
2025-06-06 14:21 ` Eli Zaretskii
2025-06-06 13:38 ` [PATCHv2 2/2] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-06-07 10:44 ` [PATCHv3 0/2] Python Style API Andrew Burgess
2025-06-07 10:44 ` [PATCHv3 1/2] gdb/python: add gdb.Style class Andrew Burgess
2025-06-07 10:44 ` [PATCHv3 2/2] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-06-09 15:54 ` [PATCHv3 0/2] Python Style API Andrew Burgess
2025-06-18 19:30 ` [PATCHv4 0/4] " Andrew Burgess
2025-06-18 19:30 ` [PATCHv4 1/4] gdb: allow gdb.Color to work correctly with pagination Andrew Burgess
2025-06-18 19:30 ` [PATCHv4 2/4] gdb/python: add gdb.Style class Andrew Burgess
2025-06-18 19:30 ` [PATCHv4 3/4] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-06-18 19:30 ` [PATCHv4 4/4] gdb: extend gdb.write to support styled output Andrew Burgess
2025-06-25 14:42 ` [PATCHv5 0/4] Python Style API Andrew Burgess
2025-06-25 14:42 ` [PATCHv5 1/4] gdb: allow gdb.Color to work correctly with pagination Andrew Burgess
2025-06-25 14:42 ` [PATCHv5 2/4] gdb/python: add gdb.Style class Andrew Burgess
2025-06-25 14:42 ` [PATCHv5 3/4] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-06-25 14:42 ` [PATCHv5 4/4] gdb/python: extend gdb.write to support styled output Andrew Burgess
2025-07-07 14:43 ` [PATCHv6 0/4] Python Style API Andrew Burgess
2025-07-07 14:43 ` [PATCHv6 1/4] gdb: allow gdb.Color to work correctly with pagination Andrew Burgess
2025-07-07 14:43 ` [PATCHv6 2/4] gdb/python: add gdb.Style class Andrew Burgess
2025-07-07 14:43 ` [PATCHv6 3/4] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-07-07 14:43 ` [PATCHv6 4/4] gdb/python: extend gdb.write to support styled output Andrew Burgess
2025-08-13 10:25 ` [PATCHv7 0/4] Fix for gdb.Color + pagination AND new gdb.Style API Andrew Burgess
2025-08-13 10:25 ` [PATCHv7 1/4] gdb: allow gdb.Color to work correctly with pagination Andrew Burgess
2025-08-24 16:13 ` Andrew Burgess
2025-08-25 10:21 ` Tom de Vries
2025-08-26 14:35 ` [PATCH] gdb/testsuite: work around empty substring bug in expect Andrew Burgess
2025-08-27 6:24 ` Tom de Vries
2025-08-13 10:29 ` [PATCHv7 2/4] gdb/python: add gdb.Style class Andrew Burgess
2025-08-13 10:30 ` [PATCHv7 4/4] gdb/python: extend gdb.write to support styled output Andrew Burgess
2025-08-13 12:37 ` Eli Zaretskii
2025-08-13 10:34 ` [PATCHv7 3/4] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-08-13 13:05 ` Eli Zaretskii
2025-08-13 13:05 ` Eli Zaretskii
2025-08-27 11:34 ` [PATCHv8 0/3] new gdb.Style API Andrew Burgess
2025-08-27 11:34 ` [PATCHv8 1/3] gdb/python: add gdb.Style class Andrew Burgess
2025-09-16 16:47 ` Tom Tromey
2025-09-23 16:59 ` Andrew Burgess
2025-08-27 11:34 ` [PATCHv8 2/3] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-09-16 16:50 ` Tom Tromey
2025-08-27 11:34 ` [PATCHv8 3/3] gdb/python: extend gdb.write to support styled output Andrew Burgess
2025-09-16 16:56 ` Tom Tromey
2025-09-23 17:05 ` Andrew Burgess
2025-09-23 18:38 ` Tom Tromey
2025-09-23 16:54 ` [PATCHv9 0/3] new gdb.Style API Andrew Burgess
2025-09-23 16:54 ` [PATCHv9 1/3] gdb/python: add gdb.Style class Andrew Burgess
2025-09-23 16:54 ` [PATCHv9 2/3] gdb/python: new class gdb.StyleParameterSet Andrew Burgess
2025-09-23 16:54 ` [PATCHv9 3/3] gdb/python: extend gdb.write to support styled output Andrew Burgess
2025-10-03 19:27 ` [PATCHv9 0/3] new gdb.Style API Tom Tromey
2025-10-05 12:51 ` Andrew Burgess
2025-10-05 15:16 ` Tom de Vries
2025-10-05 17:59 ` Tom Tromey
2025-10-06 9:01 ` Andrew Burgess
2025-10-05 18:03 ` Andrew Burgess [this message]
2025-10-05 18:41 ` Tom de Vries
2025-10-06 9:01 ` Andrew Burgess
2025-10-06 12:29 ` Tom de Vries
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v7kt6xa5.fsf@redhat.com \
--to=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=tdevries@suse.de \
--cc=tom@tromey.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox