mongodb-labs / flask-pymongo

PyMongo support for Flask applications

Repository from Github https://github.commongodb-labs/flask-pymongoRepository from Github https://github.commongodb-labs/flask-pymongo

Unexpected keyword argument 'lifetime'

joackobengochea opened this issue · comments

The dependency for pymongo lib is set as ">=3.5", causing the installation of the latest version of pymongo, in particular, the version 3.9.0, in which the argument 'lifetime' of a query() function was deleted. This causes the following crash:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/pymongo/srv_resolver.py", line 73, in _resolve_uri
    lifetime=self.__connect_timeout)
TypeError: query() got an unexpected keyword argument 'lifetime'

I'll open a PR fixing the version ASAP :)

hello, I attach the commit that causes the problem here

Closing per discussion in #134

it still return

pymongo.errors.ConfigurationError: query() got an unexpected keyword argument 'lifetime'

P.S. first install dnspython3, then uninstall dnspython, then install dnspython=2.1.0
2021-04-30_00-56-37
2021-04-30_00-56-09