From: Paul Koning <paulkoning@comcast.net>
To: Tom Tromey <tromey@adacore.com>
Cc: gdb-patches@sourceware.org, legouguec@adacore.com
Subject: Re: [PATCH] Remove f-strings from DAP
Date: Fri, 2 Jun 2023 11:57:09 -0400 [thread overview]
Message-ID: <9CA84F6F-D1F0-4C61-93F4-7E3C3F503FC7@comcast.net> (raw)
In-Reply-To: <20230602154500.3941614-1-tromey@adacore.com>
> On Jun 2, 2023, at 11:45 AM, Tom Tromey via Gdb-patches <gdb-patches@sourceware.org> wrote:
>
> Kévin pointed out that gdb claims a minimum Python version of 3.2, but
> the DAP code uses f-strings, which were added in 3.6.
>
> This patch removes the uses of f-strings from the DAP code. I can't
> test an older version of Python, but I did confirm that this still
> works with the version I have.
> ---
> gdb/python/lib/gdb/dap/evaluate.py | 2 +-
> gdb/python/lib/gdb/dap/io.py | 2 +-
> gdb/python/lib/gdb/dap/launch.py | 2 +-
> gdb/python/lib/gdb/dap/state.py | 2 +-
> 4 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/gdb/python/lib/gdb/dap/evaluate.py b/gdb/python/lib/gdb/dap/evaluate.py
> index fffd255417b..7c4fee4f84b 100644
> --- a/gdb/python/lib/gdb/dap/evaluate.py
> +++ b/gdb/python/lib/gdb/dap/evaluate.py
> @@ -62,7 +62,7 @@ def eval_request(*, expression, frameId=None, context="variables", **args):
> elif context == "repl":
> return send_gdb_with_response(lambda: _repl(expression, frameId))
> else:
> - raise Exception(f'unknown evaluate context "{context}"')
> + raise Exception("unknown evaluate context " + context)
That (and the others) is not quite equivalent to what was there before. You might do this with calls to the "format" method explicitly, as in:
+ raise Exception('unknown evaluate context "{}"'.format(context))
paul
next prev parent reply other threads:[~2023-06-02 15:57 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-02 15:45 Tom Tromey
2023-06-02 15:57 ` Paul Koning [this message]
2023-06-02 16:34 ` Tom Tromey
2023-06-02 18:14 ` Paul Koning
2023-06-02 19:02 ` Tom Tromey
2023-06-12 18:23 ` Tom Tromey
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=9CA84F6F-D1F0-4C61-93F4-7E3C3F503FC7@comcast.net \
--to=paulkoning@comcast.net \
--cc=gdb-patches@sourceware.org \
--cc=legouguec@adacore.com \
--cc=tromey@adacore.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).