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

Python 3.12 and raw/regex warnings #163

Open
reagle opened this issue Jan 5, 2024 · 1 comment
Open

Python 3.12 and raw/regex warnings #163

reagle opened this issue Jan 5, 2024 · 1 comment

Comments

@reagle
Copy link

reagle commented Jan 5, 2024

/Users/reagle/.pyenv/versions/3.12.1/lib/python3.12/site-packages/twitter/constants.py:64: SyntaxWarning: invalid escape sequence '\d'
  'UserMedia': '^tweet-\d+$',

Other language changes

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

@reagle
Copy link
Author

reagle commented Jan 5, 2024

This is supposedly easily addressed with pyupgrade.

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

1 participant