Skip to content

insert_many: unexpected keyword argument 'bypass_document_validation' in calling pymongo _Bulk #277

Description

@vestronge

Versions

txmongo==19.2.0
pymongo==3.0.3

The insert_many method of txmongo.collection.Collection uses

bulk = _Bulk(self, ordered, bypass_document_validation=False)

But the _Bulk method in pymongo 3.0.3 doesn't have the argument bypass_document_validation

class _Bulk(object):
    """The private guts of the bulk write API.
    """
    def __init__(self, collection, ordered):
         ...

This causes the following error on using insert_many

  File \"/usr/local/lib/python3.7/site-packages/txmongo/collection.py\", line 824, in insert_many
    bulk = _Bulk(self, ordered, bypass_document_validation=False)
TypeError: __init__() got an unexpected keyword argument 'bypass_document_validation'"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions