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

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Unknown
    • 4.6
    • Affects Version/s: None
    • Component/s: None
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      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
              Reporter:
              TPM Jira Automations Bot
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: