From nobody Wed Nov 27 19:37:06 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1697618125; cv=none; d=zohomail.com; s=zohoarc; b=VW6Qcp6tq072uwPLLt3rm8/r+2L6P2GtOR2lxNX64YbS3a6kCCo4PXwEYNuKoXY8cdEhJxgeDIjNgpjWbWskrsoQ6FuIITBZLOI/0bes8zjZfQuAcQk/x1L0v9yig0aP3lYAd4lv7b5mtSyKhMyUxcMcK+ICy6q1/2n0RpYy2P0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1697618125; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yQHSU18s/IxqMTzYLPyCVp4HqDLtdKCCysne3i19W6E=; b=Y3hbclkGuoJS9SlNuXukoZ985SMzMvY4i0UbvIBRTyTgTdAZ5q4+Sj2QoR2X+29sKVMCFqIrd7bTIuVkEWFdivZap3byoG+qLwW0hTl9f4ve5C75gwRgsnuRkjValhb17jrb0tYJYBYrV8Mb6H1NdLTf0P4NrA7j+CC96DQgn0w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1697618125127289.2895880653805; Wed, 18 Oct 2023 01:35:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qt1us-0001j3-5n; Wed, 18 Oct 2023 04:28:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt1uq-0001hA-3u for qemu-devel@nongnu.org; Wed, 18 Oct 2023 04:28:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qt1uo-0003fH-Mv for qemu-devel@nongnu.org; Wed, 18 Oct 2023 04:28:31 -0400 Received: from mail-ej1-f70.google.com (mail-ej1-f70.google.com [209.85.218.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-372-DdmJXRMaMveGS8dVUIRwvA-1; Wed, 18 Oct 2023 04:28:23 -0400 Received: by mail-ej1-f70.google.com with SMTP id a640c23a62f3a-99bcb13d8ddso486644266b.0 for ; Wed, 18 Oct 2023 01:28:23 -0700 (PDT) Received: from [192.168.10.118] ([2001:b07:6468:f312:63a7:c72e:ea0e:6045]) by smtp.gmail.com with ESMTPSA id n27-20020a1709062bdb00b009829d2e892csm1216818ejg.15.2023.10.18.01.28.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 01:28:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1697617710; 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=yQHSU18s/IxqMTzYLPyCVp4HqDLtdKCCysne3i19W6E=; b=JObXcLtrJ2FQv9v9KIcQ4+VmPd1pi7go/yShDVUTRGmvV/qkTh05PlHTuZKs1QOFKcgNcV gYSFVb3u7QkMnAe0IYKYdHoQ1ntdq2cntafUIfI4CbIwCYVJAEb+OrD6MZvEb7HA9tUdLB R4EKJ4nhclFjkwwhjVJ73XaK/TLWe2s= X-MC-Unique: DdmJXRMaMveGS8dVUIRwvA-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697617702; x=1698222502; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yQHSU18s/IxqMTzYLPyCVp4HqDLtdKCCysne3i19W6E=; b=k/KanJLNDXxpCKHpdFr9feQGLQmtY1qBq2r3ur0cH8utG1MB8OTvSyNvVgScPho4Ap YFZTVoozkCmpD7pyW/BJPNJkzITiSbD4MgfE6hIb/VerfxQz48S+Dc/+3YvXKuu3F9DJ YiMIk9nVDaHYxX/X1Y2siIK2nGd7plXAIVAOeYXnAfZcSiAl5wlq7YyFCuuNmDoBOJ8d AqrZKoX3tnQvywRpcSjZm0fUEpzyaJ2997wZ36kQTgY2K0zHB+lxB97eT9thjw5Egl4j j+X/+mUJuIuWcbirggF+MZTuSEhQR5FSf8uf8qdK0k+OMpe0Z2UP1Tr8wdBy/pCmEeth eUsw== X-Gm-Message-State: AOJu0YyHP07sknyQQTW3MOjjX4id59hBROfcLI8eYm5mFVE1mlgi4xMJ /OnakQc5q3d0FuiKUOtYBbyQ6nMByLEk73ZqFZl8ghoJDN+nYOawBYzgQfns09sNeEvdu9xbYGT IVta4k7CaNaqMs6S85EsKsGwGqIYURV9B3B3tSpWyAZNRp2owoGqb4hlccI2wJxNUJW0Vf6/pQr I= X-Received: by 2002:a17:907:86a0:b0:9bf:b8f7:1fcd with SMTP id qa32-20020a17090786a000b009bfb8f71fcdmr3524392ejc.14.1697617701910; Wed, 18 Oct 2023 01:28:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF0lf9a+BRjfCPbWapa/dBB+iPPwAgqm+9DCKnWltvacJxXrcqeUozYeQfg4Yejq6RKi/w8Uw== X-Received: by 2002:a17:907:86a0:b0:9bf:b8f7:1fcd with SMTP id qa32-20020a17090786a000b009bfb8f71fcdmr3524383ejc.14.1697617701587; Wed, 18 Oct 2023 01:28:21 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Cc: qemu-stable@nongnu.org Subject: [PULL 14/32] tracetool: avoid invalid escape in Python string Date: Wed, 18 Oct 2023 10:27:34 +0200 Message-ID: <20231018082752.322306-15-pbonzini@redhat.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231018082752.322306-1-pbonzini@redhat.com> References: <20231018082752.322306-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=pbonzini@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1697618126307100001 Content-Type: text/plain; charset="utf-8" This is an error in Python 3.12; fix it by using a raw string literal. Cc: qemu-stable@nongnu.org Signed-off-by: Paolo Bonzini --- scripts/tracetool/__init__.py | 14 +++++++------- scripts/tracetool/format/log_stap.py | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/tracetool/__init__.py b/scripts/tracetool/__init__.py index 33cf85e2b04..b29594d75e0 100644 --- a/scripts/tracetool/__init__.py +++ b/scripts/tracetool/__init__.py @@ -210,12 +210,12 @@ class Event(object): =20 """ =20 - _CRE =3D re.compile("((?P[\w\s]+)\s+)?" - "(?P\w+)" - "\((?P[^)]*)\)" - "\s*" - "(?:(?:(?P\".+),)?\s*(?P\".+))?" - "\s*") + _CRE =3D re.compile(r"((?P[\w\s]+)\s+)?" + r"(?P\w+)" + r"\((?P[^)]*)\)" + r"\s*" + r"(?:(?:(?P\".+),)?\s*(?P\".+))?" + r"\s*") =20 _VALID_PROPS =3D set(["disable", "vcpu"]) =20 @@ -326,7 +326,7 @@ def __repr__(self): fmt) # Star matching on PRI is dangerous as one might have multiple # arguments with that format, hence the non-greedy version of it. - _FMT =3D re.compile("(%[\d\.]*\w+|%.*?PRI\S+)") + _FMT =3D re.compile(r"(%[\d\.]*\w+|%.*?PRI\S+)") =20 def formats(self): """List conversion specifiers in the argument print format string.= """ diff --git a/scripts/tracetool/format/log_stap.py b/scripts/tracetool/forma= t/log_stap.py index 0b6549d534a..b49afababd6 100644 --- a/scripts/tracetool/format/log_stap.py +++ b/scripts/tracetool/format/log_stap.py @@ -83,7 +83,7 @@ def c_fmt_to_stap(fmt): # and "%ll" is not valid at all. Similarly the size_t # based "%z" size qualifier is not valid. We just # strip all size qualifiers for sanity. - fmt =3D re.sub("%(\d*)(l+|z)(x|u|d)", "%\\1\\3", "".join(bits)) + fmt =3D re.sub(r"%(\d*)(l+|z)(x|u|d)", r"%\1\3", "".join(bits)) return fmt =20 def generate(events, backend, group): --=20 2.41.0