pymongo 4.1.1 和 mongoengine 版本兼容性

pymongo 4.1.1 and mongoengine version compatibility

已更新到 pymongo 4.1.1 并将 mongoengine 升级到 0.24.1 但收到以下错误:

pymongo/collection.py", line 1610, in find
    return Cursor(self, *args, **kwargs)
TypeError: __init__() got an unexpected keyword 
argument 'modifiers'

我的印象是最新版本可以协同工作。他们不兼容吗?错误出现在 pymongo 本身而不是我的代码中。

pymongo 错误似乎来自已删除的选项。

来自pymongo API docs

Changed in version 4.0: Removed the modifiers option. Empty projections (eg {} or []) are passed to the server as-is, rather than the previous behavior which substituted in a projection of {"_id": 1}. This means that an empty projection will now return the entire document, not just the "_id" field.

此外,目前 (2022-05-04) 似乎有几个 pymongo >= 4.0 issues 针对 mongoengine 代码库。