Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1386

bson.Regex.__eq__ does not compare properly

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6
    • Affects Version/s: None
    • Component/s: BSON
    • 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@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: