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

Cursor add_option / remove_option don't change related instance variables.

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.6
    • Affects Version/s: None
    • Component/s: None
    • None

      Cursor.add_option(2) does not set __tailable to True. This is a problem since the behavior of Cursor changes internally when __tailable is True. This is also a problem for Cursor.add_option(4) (slave_okay).

      Cursor.remove_option is a bigger problem. In the following example the partial flag is used for the query, even though we disabled it using remove_option:

      cursor = collection.find(partial=True)
      cursor.remove_option(128)
      

      The same remove_option problem exists for timeout, tailable, slave_okay, and await_data.

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: