Skip to content

compatibility with pymongo whoes version is larger than 3.0 #1015

@normal-cock

Description

@normal-cock

Mongoengine seems not compatible with pymongo whoes version is larger than 3.0.
When I executed the follow code:

connect( 'website', alias=DEFAULT_CONNECTION_NAME, host='mongodb://username:password@localhost:27017,localhost:27117,localhost:27217/website?replicaSet=test')

I got the following error:

ConnectionError: Cannot connect to database default :
Unknown option hosts_or_uri

Then I tried to find out what happened and found that after pymongo 3.0, MongoReplicaSetClient is just a alias of MongoClient and doesn't support hosts_or_uri parameter.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions