pymongo expects slaveOk in a mongodb URI to be all lowercase.

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 1.10
    • Affects Version/s: None
    • Component/s: None
    • None
    • Environment:
      Linux x86_64
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      If you pass a mongodb URI to the connect method, pymongo expects slaveOk to be all lowercase. The documentation at http://www.mongodb.org/display/DOCS/Connections describes the option in camelcase. Pymongo should accept the option camelCase but retain the old functionality for backwards compatibility.

      repro:

      >>> conn = pymongo.Connection("mongodb://behackett-dt:27019/?connect=direct;slaveOk=true")
      >>> conn.port
      27018
      >>> conn = None
      >>> conn = pymongo.Connection("mongodb://behackett-dt:27019/?connect=direct;slaveok=true")
      >>> conn.port
      27019

              Assignee:
              Bernie Hackett
              Reporter:
              Bernie Hackett
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: