Raise a warning when no_cursor_timeout is used with an implicit session

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.12, 4.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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
            Reporter:
            Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: