django-precise-bbcode
django-precise-bbcode copied to clipboard
SyntaxWarning on Python 3.12
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.