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

fix: resolve SyntaxWarning from invalid escape sequences #61

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

Aalivexy
Copy link
Contributor

/usr/lib/python3.12/site-packages/demos/歌单同步.py:1: SyntaxWarning: invalid escape sequence '\d'
/usr/lib/python3.12/site-packages/demos/歌单同步.py:1: SyntaxWarning: invalid escape sequence '\d'
/usr/lib/python3.12/site-packages/pyncm/__main__.py:474: SyntaxWarning: invalid escape sequence '\/'
/usr/lib/python3.12/site-packages/pyncm/__main__.py:477: SyntaxWarning: invalid escape sequence '\d'
/usr/lib/python3.12/site-packages/pyncm/__main__.py:474: SyntaxWarning: invalid escape sequence '\/'
/usr/lib/python3.12/site-packages/pyncm/__main__.py:477: SyntaxWarning: invalid escape sequence '\d'

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.)

ref: https://docs.python.org/dev/whatsnew/3.12.html#other-language-changes

@mos9527
Copy link
Owner

mos9527 commented Jul 25, 2024

LGTM! Merging now.

@mos9527 mos9527 merged commit 5019dad into mos9527:master Jul 25, 2024
1 check passed
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.

2 participants