对 pymongo > 4 的支持
作者: scarlehoff创建于 2024年11月22日更新于 2026年7月24日
查看 `setup.py` 似乎支持 `pymongo>4` (也是唯一支持的版本) https://GitHub.com/hyperopt/hyperopt/blob/e9122b53041bf4bddff402ab6df251d379cf3420/setup.py#L60 但事实并非如此,因为该库使用的某些函数低于 4,这些函数已被删除。例如, `count` https://GitHub.com/hyperopt/hyperopt/blob/e9122b53041bf4bddff402ab6df251d379cf3420/hyperopt/mongoexp.py#L859 https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html#collection-count-and-Cursor-count-is-removed
内容来源: hyperopt/hyperopt