Python 3 interprets string literals as Unicode strings,
and therefore '\d' is treated as an escaped Unicode character.
If you’re not using a raw string to express the pattern,
remember that Python also uses the backslash as an escape sequence in
string literals; if the escape sequence isn’t recognized by Python’s parser,
the backslash and subsequent character are included in the resulting string.
However, if Python would recognize the resulting sequence, the backslash
should be repeated twice. This is complicated and hard to understand,
so it’s highly recommended that you use raw strings for all but the
simplest expressions. 
This patch use raw string for the regular expression.