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

bson.Regex.__eq__ does not compare properly

    XMLWordPrintable

    Details

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

      Description

      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
      

        Attachments

          Activity

            People

            • Assignee:
              shane.harvey Shane Harvey
              Reporter:
              shane.harvey Shane Harvey
              Participants:
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: