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

mongo-python-driver - PR #1566: PYTHON-4298 Fix _apply_local_threshold TypeError

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.6
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Ale-Cas has created PR #1566: PYTHON-4298 Fix _apply_local_threshold TypeError in mongo-python-driver

      Issue Text:
      Fix for TypeError caused by substraction between nulls when round_trip_time is None

      ```python
      return [
      > s for s in selection.server_descriptions if (s.round_trip_time - fastest) <= threshold
      ]
      E TypeError: unsupported operand type(s) for -: 'NoneType' and 'NoneType'
      ```
      Jira ticket: https://jira.mongodb.org/browse/PYTHON-4298
      Linked to previous PR https://github.com/mongodb/mongo-python-driver/pull/1361

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            dbeng-pm-bot PM Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: