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

Raise a warning when no_cursor_timeout is used with an implicit session

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.12, 4.0
    • Affects Version/s: None
    • Component/s: None
    • None

      It is very unexpected that a cursor created with no_cursor_timeout=True can still timeout (as described in DOCS-11255 and PYTHON-1879). We should raise an informative warning in this case:

      >>> client.t.t.find(no_cursor_timeout=True)
      __main__:1: UserWarning: use an explicit session with no_cursor_timeout=True otherwise the cursor may still timeout after 30 minutes, for more info see DOCS-11255
      <pymongo.cursor.Cursor object at 0x10aef82b0>
      

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: