-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 2.1
-
Component/s: asyncio
-
None
-
Environment:Debian running on docker on mac
pymongo==3.10.1
The asyncio motor doc documents the max_pool_size option (https://motor.readthedocs.io/en/latest/api-asyncio/asyncio_motor_client.html#motor.motor_asyncio.AsyncIOMotorClient.max_pool_size)
However this causes errors when used.
{{ app.db_string, max_pool_size=app.db_max_pool_size
File "/usr/local/lib/python3.7/site-packages/motor/core.py", line 161, in _init_
delegate = self._delegate_class_(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 647, in _init_
dict(common.validate(k, v) for k, v in keyword_opts.items()))
File "/usr/local/lib/python3.7/site-packages/pymongo/mongo_client.py", line 647, in <genexpr>
dict(common.validate(k, v) for k, v in keyword_opts.items()))
File "/usr/local/lib/python3.7/site-packages/pymongo/common.py", line 725, in validate
value = validator(option, value)
File "/usr/local/lib/python3.7/site-packages/pymongo/common.py", line 143, in raise_config_error
raise ConfigurationError("Unknown option %s" % (key,))
pymongo.errors.ConfigurationError: Unknown option max_pool_size}}
I think this is related to this option being removed from `pymongo` (perhpas the value just gets passed straight through?) https://jira.mongodb.org/browse/PYTHON-854?jql=text%20~%20%22max_pool_size%22
This is fixed by using maxPoolSize, but this option is not documented.
I imagine any fix for this might need to i. restrict the version of pymongo that you require to be newer than `3.0`.
- related to
-
PYTHON-854 max_pool_size -> maxPoolSize
- Closed