-
-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
When loading the library in Python 3.12, it's emitting the following warnings:
araby.py:274: SyntaxWarning: invalid escape sequence '\w'
TOKEN_PATTERN = re.compile(u"([^\w\u0670\u064b-\u0652']+)", re.UNICODE)
araby.py:276: SyntaxWarning: invalid escape sequence '\w'
TOKEN_PATTERN_SPLIT = re.compile(u"([\w\u0670\u064b-\u0652']+)", re.UNICODE)
araby.py:281: SyntaxWarning: invalid escape sequence '\s'
ARABIC_STRING = re.compile(u"([^\u0600-\u0652%s%s%s\s\d])" \
araby.py:1237: SyntaxWarning: invalid escape sequence '\s'
u"(?<=\s(%s|%s))%s" % (WAW, YEH, FATHA), \
araby.py:1450: SyntaxWarning: invalid escape sequence '\s'
text = re.sub(u"(?<=[\s\d])([%s])+"%(TASHKEEL_STRING),"",text, re.UNICODE)
The warning probably arises because Python 3.12 has become stricter about handling invalid escape sequences in string literals: https://docs.python.org/3/whatsnew/3.12.html#other-language-changes
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels