Here’s how to reproduce ```bash michaellaunay@Caravale:~$ sudo apt update && sudo apt dist-upgrade michaellaunay@Caravale:~$ sudo apt install gedit ... Paramétrage de gedit (46.2-2) ... /usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/library.py:212: SyntaxWarning: invalid escape sequence '\-' RE_KEY = re.compile('^([a-zA-Z_][a-zA-Z0-9_.\-]*)(\[([a-zA-Z_@]+)\])?$') /usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/substitutionparser.py:162: SyntaxWarning: invalid escape sequence '\s' match = re.match('\\\\?%s\s*' % self.REG_GROUP, tokens) ``` Attached is the patch that applies the corrections described in my previous comment
** Patch added: "This patch fixes invalid escape sequence warnings in library.py and substitutionparser.py by converting the affected strings to raw strings." https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/2061211/+attachment/5813334/+files/gedit_syntax_warning_fix.patch -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to gedit in Ubuntu. https://bugs.launchpad.net/bugs/2061211 Title: Invalid escape sequences in regexes when installing gedit Status in gedit package in Ubuntu: Confirmed Bug description: On a clean install of the 24.04 beta, if you do a "sudo apt install gedit", you get the following messages at the end of the install: /usr/lib/x86_64-linux-gnu/gedit/plugins/externaltools/library.py:212: SyntaxWarning: invalid escape sequence '\-' RE_KEY = re.compile('^([a-zA-Z_][a-zA-Z0-9_.\-]*)(\[([a-zA-Z_@]+)\])?$') /usr/lib/x86_64-linux-gnu/gedit/plugins/snippets/substitutionparser.py:162: SyntaxWarning: invalid escape sequence '\s' match = re.match('\\\\?%s\s*' % self.REG_GROUP, tokens) So there are 2 issues with regexes. Bug #2055010 reports the first of these, but not the second, and it also reports a different issue as "the huger problem" (one that I can't reproduce). I hope I'm making the right call in opening a new bug report specifically for these regex issues. Some more details: - on the clean install, I did apply all available updates before trying to install gedit - you can also reproduce this issue from the live ("try ubuntu") environment ProblemType: Bug DistroRelease: Ubuntu 24.04 Package: gedit 46.2-1build1 ProcVersionSignature: Ubuntu 6.8.0-22.22-generic 6.8.1 Uname: Linux 6.8.0-22-generic x86_64 NonfreeKernelModules: zfs ApportVersion: 2.28.0-0ubuntu1 Architecture: amd64 CasperMD5CheckResult: pass CasperVersion: 1.496 CloudArchitecture: x86_64 CloudID: nocloud CloudName: unknown CloudPlatform: nocloud CloudSubPlatform: seed-dir (/var/lib/cloud/seed/nocloud) CurrentDesktop: ubuntu:GNOME Date: Sat Apr 13 08:41:26 2024 LiveMediaBuild: Ubuntu 24.04 LTS "Noble Numbat" - Beta amd64 (20240410.2) ProcEnviron: LANG=C.UTF-8 PATH=(custom, no user) SHELL=/bin/bash TERM=xterm-256color XDG_RUNTIME_DIR=<set> SourcePackage: gedit UpgradeStatus: No upgrade log present (probably fresh install) To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/2061211/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp