Cursor.hint(<index spec>).count() raises TypeError

XMLWordPrintableJSON

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

      Found during MongoEngine upgrading:

      import pymongo
      c = pymongo.MongoClient()
      db = c["test"]
      coll = db["test"]
      coll.find().hint([('tags', 1)]).count()
      
      TypeError: passing a dict to sort/create_index/hint is not allowed - use a list of tuples instead. did you mean [('tags', 1)]?
      

      Worked with pymongo 2.8

              Assignee:
              Bernie Hackett
              Reporter:
              Ross Lawley
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: