Skip to content

snippets: fix python 3.12+ invalid escape sequence warnings#707

Open
mdeslaur wants to merge 1 commit intomate-desktop:masterfrom
mdeslaur:python-warnings
Open

snippets: fix python 3.12+ invalid escape sequence warnings#707
mdeslaur wants to merge 1 commit intomate-desktop:masterfrom
mdeslaur:python-warnings

Conversation

@mdeslaur
Copy link
Contributor

In Python 3.12+, invalid escape sequences changed from a DeprecationWarning to SyntaxWarning.

/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Document.py:830: SyntaxWarning: invalid escape sequence '/'
prot1 = re.match('(^[a-z]+://|/)(.)', first)
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Document.py:831: SyntaxWarning: invalid escape sequence '/'
prot2 = re.match('(^[a-z]+://|/)(.
)', second)
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/SubstitutionParser.py:162: SyntaxWarning: invalid escape sequence '\s'
match = re.match('\\?%s\s*' % self.REG_GROUP, tokens)

In Python 3.12+, invalid escape sequences changed from a
DeprecationWarning to SyntaxWarning.

/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Document.py:830: SyntaxWarning: invalid escape sequence '\/'
  prot1 = re.match('(^[a-z]+:\/\/|\/)(.*)', first)
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/Document.py:831: SyntaxWarning: invalid escape sequence '\/'
  prot2 = re.match('(^[a-z]+:\/\/|\/)(.*)', second)
/usr/lib/x86_64-linux-gnu/pluma/plugins/snippets/SubstitutionParser.py:162: SyntaxWarning: invalid escape sequence '\s'
  match = re.match('\\\\?%s\s*' % self.REG_GROUP, tokens)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant