Summary: | Invalid Escape Sequence warnings on various python files from pykrita | ||
---|---|---|---|
Product: | [Applications] krita | Reporter: | Charbel Nicolas <charbel> |
Component: | Scripting | Assignee: | Krita Bugs <krita-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | minor | CC: | halla |
Priority: | NOR | ||
Version First Reported In: | 5.2.3-beta1 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/graphics/krita/-/commit/1b4ccb78728681da06d0232daddf686174684561 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | Warnings screenshot |
Description
Charbel Nicolas
2024-07-01 03:28:12 UTC
A possibly relevant merge request was started @ https://invent.kde.org/graphics/krita/-/merge_requests/2203 Git commit 5d44af277b005692241a09f30e11bb0d16166823 by Dmitry Kazakov, on behalf of Freya Lupen. Committed on 29/07/2024 at 07:12. Pushed by dkazakov into branch 'master'. Fix Python invalid escape sequence warnings If Python finds a string with an invalid backslash escape such as '\*', it will throw a Syntax or Deprecation warning. In the future this will become an error. The fix is to use a raw string r'\*' instead, which won't attempt to interpolate the escape sequences in the regexes. M +3 -3 plugins/python/comics_project_management_tools/comics_exporter.py M +2 -2 plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py M +4 -4 plugins/python/comics_project_management_tools/exporters/CPMT_po_parser.py M +1 -1 plugins/python/scripter/ui_scripter/editor/pythoneditor.py M +4 -4 plugins/python/scripter/ui_scripter/syntax/syntax.py https://invent.kde.org/graphics/krita/-/commit/5d44af277b005692241a09f30e11bb0d16166823 (In reply to Dmitry Kazakov from comment #2) > Git commit 5d44af277b005692241a09f30e11bb0d16166823 by Dmitry Kazakov, on > behalf of Freya Lupen. > Committed on 29/07/2024 at 07:12. > Pushed by dkazakov into branch 'master'. > > Fix Python invalid escape sequence warnings > > If Python finds a string with an invalid backslash escape such as '\*', > it will throw a Syntax or Deprecation warning. In the future this will > become an error. The fix is to use a raw string r'\*' instead, which > won't attempt to interpolate the escape sequences in the regexes. > > M +3 -3 > plugins/python/comics_project_management_tools/comics_exporter.py > M +2 -2 > plugins/python/comics_project_management_tools/exporters/ > CPMT_ACBF_XML_Exporter.py > M +4 -4 > plugins/python/comics_project_management_tools/exporters/CPMT_po_parser.py > M +1 -1 plugins/python/scripter/ui_scripter/editor/pythoneditor.py > M +4 -4 plugins/python/scripter/ui_scripter/syntax/syntax.py > > https://invent.kde.org/graphics/krita/-/commit/ > 5d44af277b005692241a09f30e11bb0d16166823 I'm on krita 5.2.9 and I still see the same syntax warnings. Is this fix still not applied to Krita 5.2 series? It wasn't and that means it won't be in 5.2.10 which we will release tomorrow :-( Git commit 1b4ccb78728681da06d0232daddf686174684561 by Halla Rempt, on behalf of Freya Lupen. Committed on 08/07/2025 at 08:44. Pushed by rempt into branch 'krita/5.2'. Fix Python invalid escape sequence warnings If Python finds a string with an invalid backslash escape such as '\*', it will throw a Syntax or Deprecation warning. In the future this will become an error. The fix is to use a raw string r'\*' instead, which won't attempt to interpolate the escape sequences in the regexes. (cherry picked from commit 5d44af277b005692241a09f30e11bb0d16166823) M +3 -3 plugins/python/comics_project_management_tools/comics_exporter.py M +2 -2 plugins/python/comics_project_management_tools/exporters/CPMT_ACBF_XML_Exporter.py M +4 -4 plugins/python/comics_project_management_tools/exporters/CPMT_po_parser.py M +1 -1 plugins/python/scripter/ui_scripter/editor/pythoneditor.py M +4 -4 plugins/python/scripter/ui_scripter/syntax/syntax.py https://invent.kde.org/graphics/krita/-/commit/1b4ccb78728681da06d0232daddf686174684561 |