Created attachment 171220 [details] Warnings screenshot *** If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports *** SUMMARY When launching krita I get many invalid escape sequence warnings from files on the pykrita folder.... STEPS TO REPRODUCE 1. Launch krita from the terminal OBSERVED RESULT Check all the warnings about invalid escape sequences on the python files EXPECTED RESULT No warnings should show SOFTWARE/OS VERSIONS Linux/KDE Plasma: Arch Linux Qt Version: Version (compiled): 5.15.14 Version (loaded): 5.15.14
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