[{"id":28412,"web_url":"https://patchwork.libcamera.org/comment/28412/","msgid":"<170480424328.3044059.13356065624017092197@ping.linuxembedded.co.uk>","date":"2024-01-09T12:44:03","subject":"Re: [libcamera-devel] [PATCH] utils: ipc:\n\tmojom_libcamera_generator.py: Fix Python warning","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Quoting Milan Zamazal via libcamera-devel (2024-01-05 13:16:21)\n> Python 3.12 starts emitting the following warning when building libcamera:\n> \n>   .../utils/ipc/generators/mojom_libcamera_generator.py:372:\n>   SyntaxWarning: invalid escape sequence '\\.'\n>     if not re.match('^ipa\\.[0-9A-Za-z_]+', namespace):\n> \n> `r' prefix is now required before the regexp.\n> \n> Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> ---\n>  utils/ipc/generators/mojom_libcamera_generator.py | 2 +-\n>  1 file changed, 1 insertion(+), 1 deletion(-)\n> \n> diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py\n> index 1a629f9d..582818c9 100644\n> --- a/utils/ipc/generators/mojom_libcamera_generator.py\n> +++ b/utils/ipc/generators/mojom_libcamera_generator.py\n> @@ -369,7 +369,7 @@ def ValidateNamespace(namespace):\n>      if namespace == '':\n>          raise Exception('Must have a namespace')\n>  \n> -    if not re.match('^ipa\\.[0-9A-Za-z_]+', namespace):\n> +    if not re.match(r'^ipa\\.[0-9A-Za-z_]+', namespace):\n\nThis looks reasonable to me.\n\nReviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n>          raise Exception('Namespace must be of the form \"ipa.{pipeline_name}\"')\n>  \n>  def ValidateInterfaces(interfaces):\n> -- \n> 2.42.0\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 34D7ABDB1D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Jan 2024 12:44:08 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3371F62B30;\n\tTue,  9 Jan 2024 13:44:07 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id D40EB61D7B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jan 2024 13:44:05 +0100 (CET)","from pendragon.ideasonboard.com\n\t(aztw-30-b2-v4wan-166917-cust845.vm26.cable.virginm.net\n\t[82.37.23.78])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id B0E95124F;\n\tTue,  9 Jan 2024 13:43:01 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704804247;\n\tbh=S0MHHvLGBDsIMYrZiPRafeQinSgm2OQWQj7lev12LNI=;\n\th=In-Reply-To:References:To:Date:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:\n\tFrom;\n\tb=Qvm05hO00hQaxbCnlHP2569nnEq+bB4WzxK/qcOe0t8eNy4/SG51Q8eZuS1ss0Xd/\n\ty0jcL0sfAITjn4P76v2WRz1SaLcVdfN9kMhPFMltgXICLFc/p80vvjrO3Kd8nJT5a0\n\t/5/UGcwKyTSTrcy1ZrULVQ+tF6IEJl3gfm/T5Ptq/G2U32DuFreyXRbOiHkRZC4cGJ\n\tGeO0EyWRsMHdP83jWuSQ53RjS1MY9ggdLpgCsSykXjVYFtfeTS8V8XTkFNfuFIBstl\n\tmwYYyv66Bskb8ZRj/pE8dr9qU7E4rKa3hz86dWp97Wc/50oaHW9ErKBeHlY0lsRy7O\n\tt4ioSw7H06ppw==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704804181;\n\tbh=S0MHHvLGBDsIMYrZiPRafeQinSgm2OQWQj7lev12LNI=;\n\th=In-Reply-To:References:Subject:From:To:Date:From;\n\tb=r0zK1Vdns4wdfOKGhBl67KhS8PuK8JdlPchzR5imWkNZVahnKonTC+8RWBZlAb6s/\n\tyIfFY6DHKCNpy3G4n9Pe+IyLxmW6X59OQlhkSrNNmoCOTOrtZXjys2e+BtHVXiTUz+\n\tRQ6IlvOCOZZ2Mel96C/PiN7DgJ+WShIgLe7EiTXo="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"r0zK1Vdn\"; dkim-atps=neutral","Content-Type":"text/plain; charset=\"utf-8\"","MIME-Version":"1.0","Content-Transfer-Encoding":"quoted-printable","In-Reply-To":"<20240105131621.586786-1-mzamazal@redhat.com>","References":"<20240105131621.586786-1-mzamazal@redhat.com>","To":"Milan Zamazal <mzamazal@redhat.com>, libcamera-devel@lists.libcamera.org","Date":"Tue, 09 Jan 2024 12:44:03 +0000","Message-ID":"<170480424328.3044059.13356065624017092197@ping.linuxembedded.co.uk>","User-Agent":"alot/0.10","Subject":"Re: [libcamera-devel] [PATCH] utils: ipc:\n\tmojom_libcamera_generator.py: Fix Python warning","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Kieran Bingham via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":28413,"web_url":"https://patchwork.libcamera.org/comment/28413/","msgid":"<20240109125244.GF11622@pendragon.ideasonboard.com>","date":"2024-01-09T12:52:44","subject":"Re: [libcamera-devel] [PATCH] utils: ipc:\n\tmojom_libcamera_generator.py: Fix Python warning","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"On Tue, Jan 09, 2024 at 12:44:03PM +0000, Kieran Bingham via libcamera-devel wrote:\n> Quoting Milan Zamazal via libcamera-devel (2024-01-05 13:16:21)\n> > Python 3.12 starts emitting the following warning when building libcamera:\n> > \n> >   .../utils/ipc/generators/mojom_libcamera_generator.py:372:\n> >   SyntaxWarning: invalid escape sequence '\\.'\n> >     if not re.match('^ipa\\.[0-9A-Za-z_]+', namespace):\n> > \n> > `r' prefix is now required before the regexp.\n> > \n> > Signed-off-by: Milan Zamazal <mzamazal@redhat.com>\n> > ---\n> >  utils/ipc/generators/mojom_libcamera_generator.py | 2 +-\n> >  1 file changed, 1 insertion(+), 1 deletion(-)\n> > \n> > diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py\n> > index 1a629f9d..582818c9 100644\n> > --- a/utils/ipc/generators/mojom_libcamera_generator.py\n> > +++ b/utils/ipc/generators/mojom_libcamera_generator.py\n> > @@ -369,7 +369,7 @@ def ValidateNamespace(namespace):\n> >      if namespace == '':\n> >          raise Exception('Must have a namespace')\n> >  \n> > -    if not re.match('^ipa\\.[0-9A-Za-z_]+', namespace):\n> > +    if not re.match(r'^ipa\\.[0-9A-Za-z_]+', namespace):\n> \n> This looks reasonable to me.\n> \n> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n> >          raise Exception('Namespace must be of the form \"ipa.{pipeline_name}\"')\n> >  \n> >  def ValidateInterfaces(interfaces):","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 222B9C323E\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue,  9 Jan 2024 12:52:38 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 5B90362B41;\n\tTue,  9 Jan 2024 13:52:37 +0100 (CET)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 231FA61D7B\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue,  9 Jan 2024 13:52:36 +0100 (CET)","from pendragon.ideasonboard.com (213-243-189-158.bb.dnainternet.fi\n\t[213.243.189.158])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D15D0552;\n\tTue,  9 Jan 2024 13:51:31 +0100 (CET)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/simple; d=libcamera.org;\n\ts=mail; t=1704804757;\n\tbh=YWrJyac7VOhigIHIrUaco1b7L7umwugPSlyQLwhJCDk=;\n\th=Date:To:References:In-Reply-To:Subject:List-Id:List-Unsubscribe:\n\tList-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc:\n\tFrom;\n\tb=b9CHw4vNzHH8oq0vMLP2l/KIhcgVhEDi67Ioko+78/sSqwpLJYaVXTyLqPecgrNof\n\t1ptcdXFPX1usC0PrJGfPqXAVmSz96xWXk53N5LCn8opVa72nblEpU8qEnb9jDrZAN1\n\te729DOIpNdQdPWlx7o9wJRvtR20RaU1UwUUDkLrGAtQdwTYGEkMmJyPV5ig06tTlwN\n\tkt/npJczhqoNcmEddP/5T5rLRA40yUgbCLpUpXlyYgUW6w95SAa8EGmPEB3VCeiRCC\n\tHwbh0NCuoVzRKyLXCW6/TkUiG5ci2e//B+1XE9Ju4lTNzz8uIM9w4o4cUck1+eQK/F\n\tbzN59WkgMr1+w==","v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1704804692;\n\tbh=YWrJyac7VOhigIHIrUaco1b7L7umwugPSlyQLwhJCDk=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=kUf1oGVrDsynrLQihY0U5w/HkonUJh2xU8Zw+I8KT2oeErpacLboJ1q3qPNYfZgOj\n\ts8PXSWTUougppJ3NojZf6rfrqPvzuVJLEBzYiV+WTmTWXyV20WTJWHnOuTBJO+Qe5c\n\tgllPxZBTpT3qwB8VHLujyKy5Q0s55IM/p8yiwwOM="],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key; \n\tunprotected) header.d=ideasonboard.com\n\theader.i=@ideasonboard.com\n\theader.b=\"kUf1oGVr\"; dkim-atps=neutral","Date":"Tue, 9 Jan 2024 14:52:44 +0200","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20240109125244.GF11622@pendragon.ideasonboard.com>","References":"<20240105131621.586786-1-mzamazal@redhat.com>\n\t<170480424328.3044059.13356065624017092197@ping.linuxembedded.co.uk>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<170480424328.3044059.13356065624017092197@ping.linuxembedded.co.uk>","Subject":"Re: [libcamera-devel] [PATCH] utils: ipc:\n\tmojom_libcamera_generator.py: Fix Python warning","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","From":"Laurent Pinchart via libcamera-devel\n\t<libcamera-devel@lists.libcamera.org>","Reply-To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]