From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 47830385772B for ; Mon, 13 Nov 2023 15:24:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 47830385772B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 47830385772B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699889094; cv=none; b=oZwJCqh9pCwUXHiUJs+P3gd3WS6cn/A2aLRiiPhtZvxH7BsYIFFttY44v9qmHP0bSR+6mCMTMf3I9Ov2hbqO+dtoL9oEwkX1vtnDutM1h4sveD87D2koxotApTMo7yVQs2Q21gEki+MTSFQENiDzkDyOs9SVuW+yrISWdvcLnog= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1699889094; c=relaxed/simple; bh=7Dx6Wr5XbBvXdpLgFCed/19iJWcS9JojBHC/YXtMVEw=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=doj04rczI0wZ2qCUvqY5y5PZ8r/xWfTZbA76vkR513ahUxVyWsGrK3dEQUaBqEj9ePdjPjiitjxkFcR6L0KCpzq+ZdAVDJPtFfAHsw/F2Dv40yKhhRSCb/NHnslF4kVHbQUT8jUssRC6EbgWjRcXeC++mJm+n8eEZZvazRJI/NI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1699889093; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CeZw91y0O6G0h8WFyGnAN8me0Pe/h0oMCx0VFvc4gkg=; b=arGWEEvZQA0wSMqJhNA7BxVyPcPMiXMAfheWzeRy/w9BLCpRmxgOOaARkNcjqPLdG+zpBi YU83jXIR5A1K233XJVHtDDYZQ4tm37qWjcqFh5iQxGFh3k6/DS74eoDkZSgz+NMljluDMi FCOUEcTqZ8Qo+Bfs8002+qdH9OIvpdU= Received: from mail-yw1-f197.google.com (mail-yw1-f197.google.com [209.85.128.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-554-L0KbuvbLPjOte0W5rifhTA-1; Mon, 13 Nov 2023 10:24:51 -0500 X-MC-Unique: L0KbuvbLPjOte0W5rifhTA-1 Received: by mail-yw1-f197.google.com with SMTP id 00721157ae682-5a9012ab0adso62477587b3.1 for ; Mon, 13 Nov 2023 07:24:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699889091; x=1700493891; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CeZw91y0O6G0h8WFyGnAN8me0Pe/h0oMCx0VFvc4gkg=; b=F08tWR+frM31+pBWOiFVShOgQmOOt7Bfje/sny+80mDc3uWTg6KzDpaBIjkjpK8S+6 yA6/FmPLD1I5CuMq+LgAhVEcK/b1/aHkxJUArgB7wcev03b4qwrNLHUPQEDjblP96uK1 2ppbtgTDjepzJGEI+NiyM7XdJK1PGLD50yjF1usqoiCo6uN5VfEZnLweF6ySJ89701wt Ivmu9MEur3Sgz0DdFbAGFU2C35CBDuaI3KBUhbIsTgwVmqjIKWBVPKrrH482fUbwolme yDZ7e68nydA7jxwwO5cWhY8+sq9Zoj4ZR5MVuVw7gjupQbi6Gck+osc33lDcfLKoiYah zPRw== X-Gm-Message-State: AOJu0YyFTUb86peXCusL4V4QMRrTAtA4EP35GTh6yoUfypNf3klPyduY KKBIasGuhVwfGegc7L4oGEW7JZxnTbP39N528GuuVVj7hjc2g3za+c4/3F5fG2HUgKUuG1t3ssq 4C6gBe2xayxGHHvetRxSBAqju+kEIHEisvw== X-Received: by 2002:a25:d88a:0:b0:da0:3b47:bf0c with SMTP id p132-20020a25d88a000000b00da03b47bf0cmr7082756ybg.20.1699889091331; Mon, 13 Nov 2023 07:24:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEqk0EGHKbwCf4x7sfbAuI44f9QFe7BuqT6xXSha7iJlCwXW1Li7LSr8B4Fdp9cgenp0XaF38U7QuFqq0yQ4R8= X-Received: by 2002:a25:d88a:0:b0:da0:3b47:bf0c with SMTP id p132-20020a25d88a000000b00da03b47bf0cmr7082740ybg.20.1699889091066; Mon, 13 Nov 2023 07:24:51 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Mon, 13 Nov 2023 15:24:40 +0000 Message-ID: Subject: Re: [committed] libstdc++: Reformat Python code To: Romain GEISSLER Cc: "gcc-patches@gcc.gnu.org" , "libstdc++@gcc.gnu.org" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,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 Mon, 13 Nov 2023 at 14:41, Romain GEISSLER wrote: > > > Le 28 sept. 2023 =C3=A0 22:21, Jonathan Wakely a= =C3=A9crit : > > > > 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 regula= r expressions" > seems to fix the following new Python warnings: > > /opt/1A/toolchain/x86_64-v23.0.19/lib/../share/gcc-13.2.1/python/libstdcx= x/v6/printers.py:1273: SyntaxWarning: invalid escape sequence '\d' > self.typename =3D 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/libstdcx= x/v6/printers.py:1302: SyntaxWarning: invalid escape sequence '\w' > x =3D re.sub("std::string(?!\w)", s, m.group(1)) > =E2=80=A6 (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 pyt= hon >=3D 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.