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

Discrepancy in parameter documentation

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.0.1, 3.12.3
    • Affects Version/s: None
    • Component/s: Docs
    • Labels:

      As per this document, below code should work:

      from pymongo import MongoClient
      from bson.binary import UuidRepresentation
      
      client = MongoClient(conn_str, uuid_representation=UuidRepresentation.STANDARD)
      

      However, the code fails as below:

      Exception: ConfigurationError: Unknown option uuid_representation

      But an undocumented parameter works:

      client = MongoClient(conn_str, uuidRepresentation="standard")
      

      The parameter is in camelCase and not preferred in python coding conventions. Also time-crunch for developer to find this option unless heavy digging through depths of the source code. Only mention I could find was in changelog document, which is not ideal location and does not provide detailed explanation.

      Please update the document to suggest developers to use uuidRepresentation instead of uuid_representation in case uuid_representation is old deprecated parameter.

      Note: I would prefer to raise such ticket in issues section of GitHub.com. Should not have disabled issues section there. This Jira ticket system is not ideal for external developers, according to me.

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            harshith.vijay@asteria.co.in Harshith JV
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: