Skip to content

Pattern matching does not match redis behaviour #182

@bmerry

Description

@bmerry

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions