From 5f765e364372b1bd555caf350e12902f8f16c090 Mon Sep 17 00:00:00 2001 From: Gioacchino Mazzurco Date: Sat, 13 Jun 2026 17:14:03 +0200 Subject: [PATCH] fix invalid escape sequence in jsonapi-generator.py Make the TemplateOwn.pattern string a raw string to silence Python 3.12+ SyntaxWarning for \$ escape sequences. --- src/jsonapi/jsonapi-generator.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/jsonapi/jsonapi-generator.py b/src/jsonapi/jsonapi-generator.py index e8c09c568..2d91e27b3 100755 --- a/src/jsonapi/jsonapi-generator.py +++ b/src/jsonapi/jsonapi-generator.py @@ -3,8 +3,7 @@ # RetroShare JSON API generator # # Copyright (C) 2019 selankon -# Copyright (C) 2021-2022 Gioacchino Mazzurco -# Copyright (C) 2021-2022 Asociación Civil Altermundi +# Copyright (C) 2021-2026 Gioacchino Mazzurco # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the @@ -47,7 +46,7 @@ class MethodParam: class TemplateOwn(Template): delimiter = '$%' - pattern = ''' + pattern = r''' \$%(?: (?P\$\%) | # Escape sequence of two delimiters (?P[_a-z][_a-z0-9]*)%\$ | # delimiter and a Python identifier