By 'regression' I meant 'something that used to work and now doesn't work': e.g.:
$ python2 -c 'import re; re.search("hi", "hi", re.LOCALE)'
$ python3.5 -c 'import re; re.search("hi", "hi", re.LOCALE)'
$ python3.6 -c 'import re; re.search("hi", "hi", re.LOCALE)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/python3.6/re.py", line 182, in search
return _compile(pattern, flags).search(string)
File "/usr/lib/python3.6/re.py", line 301, in _compile
p = sre_compile.compile(pattern, flags)
File "/usr/lib/python3.6/sre_compile.py", line 562, in compile
p = sre_parse.parse(p, flags)
File "/usr/lib/python3.6/sre_parse.py", line 866, in parse
p.pattern.flags = fix_flags(str, p.pattern.flags)
File "/usr/lib/python3.6/sre_parse.py", line 833, in fix_flags
raise ValueError("cannot use LOCALE flag with a str pattern")
ValueError: cannot use LOCALE flag with a str pattern
The error message sure makes it look like an intentional API break. :(
By 'regression' I meant 'something that used to work and now doesn't work': e.g.:
$ python2 -c 'import re; re.search("hi", "hi", re.LOCALE)' python3. 6/re.py" , line 182, in search search( string) python3. 6/re.py" , line 301, in _compile compile( pattern, flags) python3. 6/sre_compile. py", line 562, in compile python3. 6/sre_parse. py", line 866, in parse python3. 6/sre_parse. py", line 833, in fix_flags
$ python3.5 -c 'import re; re.search("hi", "hi", re.LOCALE)'
$ python3.6 -c 'import re; re.search("hi", "hi", re.LOCALE)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/lib/
return _compile(pattern, flags).
File "/usr/lib/
p = sre_compile.
File "/usr/lib/
p = sre_parse.parse(p, flags)
File "/usr/lib/
p.pattern.flags = fix_flags(str, p.pattern.flags)
File "/usr/lib/
raise ValueError("cannot use LOCALE flag with a str pattern")
ValueError: cannot use LOCALE flag with a str pattern
The error message sure makes it look like an intentional API break. :(
Thanks