From 19b798da3ccf961feb675cdd1b13089ae8c5b7d8 Mon Sep 17 00:00:00 2001 From: lorenzo angeli Date: Thu, 24 Sep 2026 17:30:31 +0200 Subject: [PATCH 1/2] fix: resolve Python 3.13 SyntaxWarning for invalid escape sequence in regex (#68) Add r-prefix to regex string in StandardStructure.sanitise_for_filesystem to fix SyntaxWarning on Python 3.13. Co-Authored-By: Claude Sonnet 4.6 --- source/ftrack_api/structure/standard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ftrack_api/structure/standard.py b/source/ftrack_api/structure/standard.py index 388e1a10..69fad473 100644 --- a/source/ftrack_api/structure/standard.py +++ b/source/ftrack_api/structure/standard.py @@ -130,7 +130,7 @@ def sanitise_for_filesystem(self, value): value = unicodedata.normalize("NFKD", str(value)).encode("ascii", "ignore") value = re.sub( - "[^\w\.-]", self.illegal_character_substitute, value.decode("utf-8") + r"[^\w\.-]", self.illegal_character_substitute, value.decode("utf-8") ) return str(value.strip().lower()) From 583306a30b56cd058eb34696a659d047e8bd4f5f Mon Sep 17 00:00:00 2001 From: lorenzo angeli Date: Thu, 24 Sep 2026 17:31:27 +0200 Subject: [PATCH 2/2] fix: resolve Python 3.13 SyntaxWarning for invalid escape sequence in docstring (#68) Add r-prefix to docstring in plugin.discover to fix SyntaxWarning on Python 3.13 caused by \* and \*\* RST markup being treated as invalid escape sequences. Co-Authored-By: Claude Sonnet 4.6 --- source/ftrack_api/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ftrack_api/plugin.py b/source/ftrack_api/plugin.py index 6e05e8be..cf19d627 100644 --- a/source/ftrack_api/plugin.py +++ b/source/ftrack_api/plugin.py @@ -29,7 +29,7 @@ def load_source(modname, filename): def discover(paths, positional_arguments=None, keyword_arguments=None): - """Find and load plugins in search *paths*. + r"""Find and load plugins in search *paths*. Each discovered module should implement a register function that accepts *positional_arguments* and *keyword_arguments* as \*args and \*\*kwargs