bson.Regex.__eq__ does not compare properly

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.6
    • Affects Version/s: None
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Reported (and fixed) by this pull request: https://github.com/mongodb/mongo-python-driver/pull/337

      The bug is that two bson.Regex's with the same flags but different pattern will compare equal:

      >>> from bson import Regex
      >>> Regex('a') == Regex('b')
      True
      

            Assignee:
            Shane Harvey
            Reporter:
            Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: