Pattern matching does not match redis behaviour
bmerry opened this issue · 0 comments
bmerry commented
The implementation of KEYS and SCAN uses fnmatch.fnmatch
to match the pattern. This has a few problems:
- At a minimum it should use fnmatchcase to avoid being case-insensitive on some OSes.
- It does not support backslash escapes.
- It uses
!
instead of^
for negated - It seems to handle invalid ranges like
[e-a]
differently (raises an exception, whereas redis does something unspecified I still need to work out).
It also operates by turning both arguments into native strings using the system default encoding, even though they might not be valid in that encoding.