From: Jonathan Wakely <jwakely@redhat.com>
To: Romain GEISSLER <romain.geissler@amadeus.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>
Subject: Re: [committed] libstdc++: Reformat Python code
Date: Mon, 13 Nov 2023 15:24:40 +0000 [thread overview]
Message-ID: <CACb0b4=hEmrEKrO_9ZYddYKYEnYJ-hov6W8fYeoCTpP2OM9dxg@mail.gmail.com> (raw)
In-Reply-To: <DA19EF37-3A67-4AA3-ADD2-E4C0CF02CBF7@amadeus.com>
On Mon, 13 Nov 2023 at 14:41, Romain GEISSLER
<romain.geissler@amadeus.com> wrote:
>
> > 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/printers.py:1273: 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/printers.py:1302: SyntaxWarning: invalid escape sequence '\w'
> x = re.sub("std::string(?!\w)", s, m.group(1))
> … (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 ?
Yes, I'll do that backport (and most of the other Python improvements
too, at least for gcc-13).
Thanks for raising it.
next prev parent reply other threads:[~2023-11-13 15:24 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
2023-11-13 15:24 ` Jonathan Wakely [this message]
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:
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='CACb0b4=hEmrEKrO_9ZYddYKYEnYJ-hov6W8fYeoCTpP2OM9dxg@mail.gmail.com' \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
--cc=romain.geissler@amadeus.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).