From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from resdmta-h1p-028597.sys.comcast.net (resdmta-h1p-028597.sys.comcast.net [IPv6:2001:558:fd02:2446::d]) by sourceware.org (Postfix) with ESMTPS id 01E7A3856DCB for ; Fri, 2 Jun 2023 15:57:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01E7A3856DCB Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=comcast.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=comcast.net Received: from resomta-h1p-027916.sys.comcast.net ([96.102.179.203]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resdmta-h1p-028597.sys.comcast.net with ESMTP id 538EqrkbkHuwO579NqJQFO; Fri, 02 Jun 2023 15:57:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=20190202a; t=1685721433; bh=dWidH8aVjwpMWwCzxTos1FxaizRUUOEqZKAFZwXaffA=; h=Received:Received:Content-Type:Mime-Version:Subject:From:Date: Message-Id:To:Xfinity-Spam-Result; b=Dn+Zb62ViT6BAkc2f4RRXYUL8mVEMuZlH55NfRR70NqLUjHj+TBvmIaW7UopYU6ug 732cSg2NRo/KQuTaD1rM1vSbJvTt4ksWBoiQStEGhBEUq9CEGX9BHKSBWqhOOJlqgg rhx4en0LKIncwyeROapR5mMpWdkSBak8BNimEIggE96TuBoFkmBszlz4Z9oO0005B9 QrKVlW/iMKPE5xc0WCy7pC1Au5uYVHDNPRZjRBEHZoDB5vlEpd4jSYOp0NmXjzMMpK tUbEFy3S5IpHOLmRY8RLc3OPW1kr3jDo5UIMz/QZ3WmZn201/kNXF0XVJx5j0eWOBo 7LCAVIf1LlWQA== Received: from smtpclient.apple ([73.60.223.101]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 256/256 bits) (Client did not present a certificate) by resomta-h1p-027916.sys.comcast.net with ESMTPSA id 579Kq8BinjEqD579Lq5Aq4; Fri, 02 Jun 2023 15:57:13 +0000 X-Xfinity-VAAS: gggruggvucftvghtrhhoucdtuddrgedvhedrfeelfedgledvucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuvehomhgtrghsthdqtfgvshhipdfqfgfvpdfpqffurfetoffkrfenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurheptggguffhjgffvefgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefrrghulhcumfhonhhinhhguceophgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtqeenucggtffrrghtthgvrhhnpeelvedvhfffledujedvleeuffetudefvefhueffleefjeettdduhedvkeehvddvteenucfkphepjeefrdeitddrvddvfedruddtudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhephhgvlhhopehsmhhtphgtlhhivghnthdrrghpphhlvgdpihhnvghtpeejfedriedtrddvvdefrddutddupdhmrghilhhfrhhomhepphgruhhlkhhonhhinhhgsegtohhmtggrshhtrdhnvghtpdhnsggprhgtphhtthhopeefpdhrtghpthhtohepthhrohhmvgihsegruggrtghorhgvrdgtohhmpdhrtghpthhtohepghgusgdqphgrthgthhgvshesshhouhhrtggvfigrrhgvrdhorhhgpdhrtghpthhtoheplhgvghhouhhguhgvtgesrggurggtohhrvgdrtghomh X-Xfinity-VMeta: sc=-100.00;st=legit Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.3\)) Subject: Re: [PATCH] Remove f-strings from DAP From: Paul Koning In-Reply-To: <20230602154500.3941614-1-tromey@adacore.com> Date: Fri, 2 Jun 2023 11:57:09 -0400 Cc: gdb-patches@sourceware.org, legouguec@adacore.com Content-Transfer-Encoding: quoted-printable Message-Id: <9CA84F6F-D1F0-4C61-93F4-7E3C3F503FC7@comcast.net> References: <20230602154500.3941614-1-tromey@adacore.com> To: Tom Tromey X-Mailer: Apple Mail (2.3696.120.41.1.3) X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > On Jun 2, 2023, at 11:45 AM, Tom Tromey via Gdb-patches = wrote: >=20 > K=C3=A9vin 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. >=20 > 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(-) >=20 > 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=3DNone, = context=3D"variables", **args): > elif context =3D=3D "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