Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying alternative connection_class #2729

Merged
merged 1 commit into from
Jan 28, 2023

Conversation

davidlatwe
Copy link
Contributor

This addresses #1168 (an old issue 馃槃).

This pull request opens door for projects like montydb or mongita that provids mongo-like alternative for testing or simple production usage, able to gain benefit from mongoengine.

There's some small amount of discussions in said projects:
scottrogowski/mongita#4
davidlatwe/montydb#64

And the only workaround for this is to monkey-patch pymongo.MongoClient just like what #1168 has concluded.

But thanks to the evolution that mongoengine has been through, the codebase seems able to enable this feature easily. Hance this PR.

Please let me know what you think, thanks.

@bagerard
Copy link
Collaborator

This is great and is much more elegant and less invasive than the previous way to integrate mongomock. Thanks for the contribution 馃殌

I did some modification on top of it here, should be merged soon

@bagerard bagerard merged commit ee5b1bb into MongoEngine:master Jan 28, 2023
@davidlatwe davidlatwe deleted the alternative_conection branch January 29, 2023 07:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants