Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-1209

Motor's DriverInfo should not be overwritten

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.3.2
    • Affects Version/s: None
    • Component/s: None
    • None

      Motor adds it's own DriverInfo like this:

          def __init__(self, *args, **kwargs):
      ...
              kwargs.setdefault(
                  "driver", DriverInfo("Motor", motor_version, self._framework.platform_info())
              )
      

      Which will show up in metadata like this:

      'driver': {
          'name': 'PyMongo|Motor',
          'version': '4.6.0|3.1.1',
      },
      

      This means that if the app supplies its own DriverInfo, then it will replace Motor's:

      client = AsyncIOMotorClient(driver=DriverInfo(name="MyLibrary", version="1.0"))
      

      will yield:

      'driver': {
          'name': 'PyMongo|MyLibrary',
          'version': '4.6.0|1.0',
      },
      

      In this ticket we should change the above to produce:

      'driver': {
          'name': 'PyMongo|Motor|MyLibrary',
          'version': '4.6.0|3.1.1|1.0',
      },
      

            Assignee:
            jib.adegunloye@mongodb.com Jib Adegunloye
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: