From: Simon Marchi <simon.marchi@polymtl.ca>
To: Andrew Burgess <aburgess@redhat.com>,
Simon Marchi via Gdb-patches <gdb-patches@sourceware.org>
Subject: Re: [PATCH v2 00/10] Add typing annotations to gdbarch*.py and make-target-delegates.py
Date: Sun, 26 Feb 2023 20:11:40 -0500 [thread overview]
Message-ID: <dec3b5b4-f3bb-b6bd-be85-77068b0afa66@polymtl.ca> (raw)
In-Reply-To: <878rgmj98p.fsf@redhat.com>
On 2/25/23 06:05, Andrew Burgess wrote:
> Simon Marchi via Gdb-patches <gdb-patches@sourceware.org> writes:
>
>> v2 of:
>>
>> https://inbox.sourceware.org/gdb-patches/877cw6hma2.fsf@tromey.com/T/#t
>>
>> Patch "gdb: gdbarch.py: remove Info.__init__" is new, the rest hasn't
>> changed.
>>
>> Simon Marchi (10):
>> gdb: remove invalid / dead code from gdbarch.py
>> gdb: reformat Python files with black 23.1.0
>> gdb: gdbarch.py: spell out parameters of _Component.__init__
>> gdb: gdbarch.py: remove Info.__init__
>> gdb: pyproject.toml: set pyright typeCheckingMode = "strict"
>> gdb: split gdbarch component types to gdbarch_types.py
>> gdb: gdbarch*.py, copyright.py: add type annotations
>> gdb: make-target-delegates.py: make one string raw
>> gdb: make-target-delegates.py: add Entry type
>> gdb: make-target-delegates.py: add type annotations
>
> Hi Simon,
>
> I tried this series and I now get this error when rerunning gdbarch.py:
>
> $ ./gdbarch.py
> Traceback (most recent call last):
> File "./gdbarch.py", line 26, in <module>
> import gdbarch_components # noqa: F401 # type: ignore
> File "/home/andrew/projects/binutils-gdb/src.dev-2/gdb/gdbarch_components.py", line 120, in <module>
> from gdbarch_types import Function, Info, Method, Value
> File "/home/andrew/projects/binutils-gdb/src.dev-2/gdb/gdbarch_types.py", line 31, in <module>
> def join_params(params: list[tuple[str, str]]):
> TypeError: 'type' object is not subscriptable
> $ python --version
> Python 3.7.9
>
> Any thoughts?
Ah, that's because using the built-in types (like `list`) only works
starting with 3.9. So I should use the types from the typing module,
like `List`:
https://docs.python.org/3.7/library/typing.html#typing.List
I'll send a v3 with that changed.
Simon
prev parent reply other threads:[~2023-02-27 1:11 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-25 3:30 Simon Marchi
2023-02-25 3:30 ` [PATCH v2 01/10] gdb: remove invalid / dead code from gdbarch.py Simon Marchi
2023-02-25 3:30 ` [PATCH v2 02/10] gdb: reformat Python files with black 23.1.0 Simon Marchi
2023-02-25 3:30 ` [PATCH v2 03/10] gdb: gdbarch.py: spell out parameters of _Component.__init__ Simon Marchi
2023-02-25 3:30 ` [PATCH v2 04/10] gdb: gdbarch.py: remove Info.__init__ Simon Marchi
2023-02-25 3:30 ` [PATCH v2 05/10] gdb: pyproject.toml: set pyright typeCheckingMode = "strict" Simon Marchi
2023-02-25 3:30 ` [PATCH v2 06/10] gdb: split gdbarch component types to gdbarch_types.py Simon Marchi
2023-02-25 3:30 ` [PATCH v2 07/10] gdb: gdbarch*.py, copyright.py: add type annotations Simon Marchi
2023-02-25 3:30 ` [PATCH v2 08/10] gdb: make-target-delegates.py: make one string raw Simon Marchi
2023-02-25 3:30 ` [PATCH v2 09/10] gdb: make-target-delegates.py: add Entry type Simon Marchi
2023-02-25 3:30 ` [PATCH v2 10/10] gdb: make-target-delegates.py: add type annotations Simon Marchi
2023-02-25 11:05 ` [PATCH v2 00/10] Add typing annotations to gdbarch*.py and make-target-delegates.py Andrew Burgess
2023-02-27 1:11 ` Simon Marchi [this message]
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=dec3b5b4-f3bb-b6bd-be85-77068b0afa66@polymtl.ca \
--to=simon.marchi@polymtl.ca \
--cc=aburgess@redhat.com \
--cc=gdb-patches@sourceware.org \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).