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

RawBatchCursor should raise StopIteration on receiving an empty batch instead of returning empty bytes

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.12, 4.0
    • Affects Version/s: None
    • Component/s: None
    • None

      If db.test is an empty collection, we see the following behavior:

      cursor = db.test.find_raw_batches()
      assert next(cursor) == b""
      

      Instead of returning empty bytes, this should instead raise StopIteration.

            Assignee:
            prashant.mital Prashant Mital (Inactive)
            Reporter:
            prashant.mital Prashant Mital (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: