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

SyntaxWarning on Python 3.12 #57

Open
sergei-maertens opened this issue Mar 2, 2024 · 0 comments
Open

SyntaxWarning on Python 3.12 #57

sergei-maertens opened this issue Mar 2, 2024 · 0 comments

Comments

@sergei-maertens
Copy link

I'm checking if I can upgrade a project to Python 3.12 yet, and while doing so, this library shows some syntax warnings:

2.508 /usr/local/lib/python3.12/site-packages/precise_bbcode/bbcode/placeholder.py:37: SyntaxWarning: invalid escape sequence '\w'                                                            
2.508   if not re.match('^[\w]+$', new_placeholder.name):                                                                                                                                     
2.510 /usr/local/lib/python3.12/site-packages/precise_bbcode/bbcode/tag.py:46: SyntaxWarning: invalid escape sequence '\s'                                                                    
2.510   if not re.match('^[^\s=]+$', new_tag.name):   

I believe these should be updated to raw strings, so adding a r -prefix should be sufficient.

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