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

Timestamp objects ordering incorrect

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.7
    • Affects Version/s: None
    • Component/s: None
    • None

      Comparing the order of Timestamp objects in Python surprisingly does not return the expected answer:

      >>> from bson import Timestamp
      >>> Timestamp(2, 1) > Timestamp(1, 1)
      False
      

      These objects represent points in time (for example in the oplog) and there is a strict order (first by .time then by .inc). We should at least support comparing Timestamp objects to each other.

            Assignee:
            jesse@mongodb.com A. Jesse Jiryu Davis
            Reporter:
            thomas.rueckstiess@mongodb.com Thomas Rueckstiess
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: