Skip to content

Incompatible with the latest pymongo #41

Open
@inaferando

Description

@inaferando

keyword 'safe' is not expected in save operations since 3.0 version of pymongo

  File "/usr/local/lib/python2.7/dist-packages/flaskext/mongoalchemy/__init__.py", line 264, in save
    self._session.insert(self, safe=safe)
  File "/usr/local/lib/python2.7/dist-packages/mongoalchemy/session.py", line 172, in insert
    self.add(item, safe=safe)
  File "/usr/local/lib/python2.7/dist-packages/mongoalchemy/session.py", line 188, in add
    return self.flush()
  File "/usr/local/lib/python2.7/dist-packages/mongoalchemy/session.py", line 414, in flush
    result = op.execute()
  File "/usr/local/lib/python2.7/dist-packages/mongoalchemy/ops.py", line 97, in execute
    return self.collection.save(self.data, safe=self.safe)
  File "/usr/local/lib/python2.7/dist-packages/pymongo/collection.py", line 1898, in save
    write_concern = WriteConcern(**kwargs)
TypeError: __init__() got an unexpected keyword argument 'safe'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions