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

Support comment for delete_one and delete_many

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Query Operations
    • None

      The delete command supports a comment, but this is not exposed in pymongo.

      https://docs.mongodb.com/v4.4/reference/command/delete/

       

      >>> import pymongo
      >>> client = pymongo.MongoClient("mongodb://localhost:27017/...")
      >>> client.foo.bar.delete_many({}, comment="testcomment")
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      TypeError: delete_many() got an unexpected keyword argument 'comment'
      >>> client.foo.bar.delete_one({}, comment="testcomment")
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      TypeError: delete_one() got an unexpected keyword argument 'comment'
      

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            rectalogic Andrew Wason
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: