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

Mitigate user issues caused by change in directConnection defaults in 4.x

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.2
    • Affects Version/s: None
    • Component/s: None
    • None

      We've had a number of reports of users being unable to connect existing applications after upgrading to PyMongo 4.x. The problem is the change of default value for directConnection from None (effectively True) to False. See PYTHON-2679 for details about the change, which brings PyMongo into compliance with DRIVERS-737.

      Related user reports:
      PYTHON-3246
      PYTHON-3076
      PYTHON-3240
      PYTHON-3041
      And a host of MongoDB community forum posts (and probably stackoverflow, but I haven't checked) and questions from internal teams.

      In all cases the solution to the user problem is to add "directConnection=true" to their URI or pass directConnection=True as a keyword argument to MongoClient.

      At the very least we need to make this change and its implications far more visible. Moving the changelog mention from it's current position buried in a long list of changes to the top of the list in warning text, adding warning text to the docstring for mongo_client.MongoClient, and providing examples of the kinds of problems users are likely to experience in the upgrade guide.

            Assignee:
            julius.park@mongodb.com Julius Park (Inactive)
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: