Message ID | 20240105131621.586786-1-mzamazal@redhat.com |
---|---|
State | Accepted |
Commit | 3d45b9ad9aefd4b1e702f89febe4aa6e6d3e2b9c |
Headers | show |
Series |
|
Related | show |
Quoting Milan Zamazal via libcamera-devel (2024-01-05 13:16:21) > Python 3.12 starts emitting the following warning when building libcamera: > > .../utils/ipc/generators/mojom_libcamera_generator.py:372: > SyntaxWarning: invalid escape sequence '\.' > if not re.match('^ipa\.[0-9A-Za-z_]+', namespace): > > `r' prefix is now required before the regexp. > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> > --- > utils/ipc/generators/mojom_libcamera_generator.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py > index 1a629f9d..582818c9 100644 > --- a/utils/ipc/generators/mojom_libcamera_generator.py > +++ b/utils/ipc/generators/mojom_libcamera_generator.py > @@ -369,7 +369,7 @@ def ValidateNamespace(namespace): > if namespace == '': > raise Exception('Must have a namespace') > > - if not re.match('^ipa\.[0-9A-Za-z_]+', namespace): > + if not re.match(r'^ipa\.[0-9A-Za-z_]+', namespace): This looks reasonable to me. Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > raise Exception('Namespace must be of the form "ipa.{pipeline_name}"') > > def ValidateInterfaces(interfaces): > -- > 2.42.0 >
On Tue, Jan 09, 2024 at 12:44:03PM +0000, Kieran Bingham via libcamera-devel wrote: > Quoting Milan Zamazal via libcamera-devel (2024-01-05 13:16:21) > > Python 3.12 starts emitting the following warning when building libcamera: > > > > .../utils/ipc/generators/mojom_libcamera_generator.py:372: > > SyntaxWarning: invalid escape sequence '\.' > > if not re.match('^ipa\.[0-9A-Za-z_]+', namespace): > > > > `r' prefix is now required before the regexp. > > > > Signed-off-by: Milan Zamazal <mzamazal@redhat.com> > > --- > > utils/ipc/generators/mojom_libcamera_generator.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py > > index 1a629f9d..582818c9 100644 > > --- a/utils/ipc/generators/mojom_libcamera_generator.py > > +++ b/utils/ipc/generators/mojom_libcamera_generator.py > > @@ -369,7 +369,7 @@ def ValidateNamespace(namespace): > > if namespace == '': > > raise Exception('Must have a namespace') > > > > - if not re.match('^ipa\.[0-9A-Za-z_]+', namespace): > > + if not re.match(r'^ipa\.[0-9A-Za-z_]+', namespace): > > This looks reasonable to me. > > Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > raise Exception('Namespace must be of the form "ipa.{pipeline_name}"') > > > > def ValidateInterfaces(interfaces):
diff --git a/utils/ipc/generators/mojom_libcamera_generator.py b/utils/ipc/generators/mojom_libcamera_generator.py index 1a629f9d..582818c9 100644 --- a/utils/ipc/generators/mojom_libcamera_generator.py +++ b/utils/ipc/generators/mojom_libcamera_generator.py @@ -369,7 +369,7 @@ def ValidateNamespace(namespace): if namespace == '': raise Exception('Must have a namespace') - if not re.match('^ipa\.[0-9A-Za-z_]+', namespace): + if not re.match(r'^ipa\.[0-9A-Za-z_]+', namespace): raise Exception('Namespace must be of the form "ipa.{pipeline_name}"') def ValidateInterfaces(interfaces):
Python 3.12 starts emitting the following warning when building libcamera: .../utils/ipc/generators/mojom_libcamera_generator.py:372: SyntaxWarning: invalid escape sequence '\.' if not re.match('^ipa\.[0-9A-Za-z_]+', namespace): `r' prefix is now required before the regexp. Signed-off-by: Milan Zamazal <mzamazal@redhat.com> --- utils/ipc/generators/mojom_libcamera_generator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)