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

PyMongo 2.x Database.command() can raise DeprecationWarning

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 2.9.2
    • Affects Version/s: 2.9, 2.9.1
    • Component/s: None
    • Labels:
      None

      In PyMongo 2.x, Database.command can call self.connection.disconnect in certain error cases. PyMongo 2.9 deprecated MongoClient.disconnect(), raising DeprecationWarning, in favor of MognoClient.close(). This means that Database.command can sometimes unnecessarily raise DeprecationWarning.

      Sadly, we can't just switch to close() because MongoReplicaSetClient.disconnect() has very different behavior from MongoReplicaSetClient.close() (close() shuts down the replica set monitor).

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: