babel/plural.py contains the following line:
('ellipsis', re.compile(r'\.{2,3}|\u2026', re.UNICODE)) # U+2026: ELLIPSIS
But \uXXXX escape sequences in regexps were added only in Python 3.3.
In earlier versions, \u stands for literal \u.
In other words, in Python 2.X this line is equivalent to:
('ellipsis', re.compile(r'\.{2,3}|u2026', re.UNICODE))
...which is certainly not what you wanted.
NB, the re.UNICODE flag affects only semantics of \w, \W, \b, \B, \d, \D, \s and \S, so it is no-op here.
The dubious regexp was found using pydiatra.
babel/plural.pycontains the following line:But
\uXXXXescape sequences in regexps were added only in Python 3.3.In earlier versions,
\ustands for literal\u.In other words, in Python 2.X this line is equivalent to:
...which is certainly not what you wanted.
NB, the
re.UNICODEflag affects only semantics of\w,\W,\b,\B,\d,\D,\sand\S, so it is no-op here.The dubious regexp was found using pydiatra.