public inbox for
 help / color / mirror / Atom feed
From: Romain GEISSLER <>
To: "" <>,
	"" <>
Subject: Re: [committed] libstdc++: Reformat Python code
Date: Mon, 13 Nov 2023 14:40:51 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <20230928202156.3004584-1-jwakely () redhat ! com>

> Le 28 sept. 2023 à 22:21, Jonathan Wakely <jwakely redhat ! com> a écrit :
> Tested x86_64-linux (GDB 13.2, Python 3.11). Pushed to trunk.
> -- >8 --
> Some of these changes were suggested by autopep8's --aggressive
> option, others are for readability.
> Break long lines by splitting strings across multiple lines, or
> introducing local variables to hold results.
> Use raw strings for regular expressions, so that backslashes don't need
> to be escaped.

Hi Jonathan,

FYI, it seems that with python 3.12, the bits "Use raw strings for regular expressions"
seems to fix the following new Python warnings:

/opt/1A/toolchain/x86_64-v23.0.19/lib/../share/gcc-13.2.1/python/libstdcxx/v6/ SyntaxWarning: invalid escape sequence '\d'
  self.typename = re.sub('^std::experimental::fundamentals_v\d::', 'std::experimental::', self.typename, 1)
/opt/1A/toolchain/x86_64-v23.0.19/lib/../share/gcc-13.2.1/python/libstdcxx/v6/ SyntaxWarning: invalid escape sequence '\w'
  x = re.sub("std::string(?!\w)", s,
 … (snapped, there are a bit more than that in total).

How ok would it be to backport to the branches still maintained the "raw string" fix,
in order to avoid deprecation warnings as soon as people use gdb with python >= 3.12 ?


       reply	other threads:[~2023-11-13 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230928202156.3004584-1-jwakely () redhat ! com>
2023-11-13 14:40 ` Romain GEISSLER [this message]
2023-11-13 15:24   ` Jonathan Wakely
2023-11-13 15:29     ` Romain GEISSLER
2023-09-28 20:21 Jonathan Wakely

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* 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).