Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning invalid escape sequence #10

Closed
johnthagen opened this issue May 10, 2023 · 2 comments
Closed

DeprecationWarning invalid escape sequence #10

johnthagen opened this issue May 10, 2023 · 2 comments

Comments

@johnthagen
Copy link

vbuild/__init__.py:230: DeprecationWarning: invalid escape sequence '\*'
  css = re.sub(re.compile("/\*.*?\*/", re.DOTALL), "", css)

css = re.sub(re.compile("/\*.*?\*/", re.DOTALL), "", css)

This is being promoted to a SyntaxWarning in Python 3.12:

A backslash-character pair that is not a valid escape sequence now generates a SyntaxWarning, instead of DeprecationWarning. For example, re.compile("\d+.\d+") now emits a SyntaxWarning ("\d" is an invalid escape sequence), use raw strings for regular expression: re.compile(r"\d+.\d+"). In a future Python version, SyntaxError will eventually be raised, instead of SyntaxWarning. (Contributed by Victor Stinner in gh-98401.)

This will break in a future Python release when this is promoted to a SyntaxError.

@johnthagen
Copy link
Author

Related:

@manatlan
Copy link
Owner

manatlan commented Aug 3, 2023

fixed in 0.8.2

@manatlan manatlan closed this as completed Aug 3, 2023
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

No branches or pull requests

2 participants