You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discussion: Defining the best path forward for mongomock
Opening this discussion to define the best path forward for the library. In the last few days I've been working to accelerate the repository — closing the gap with upstream, modernizing CI/CD, and mapping out the remaining work.
Now that I've been invited as a maintainer of the mongomock repo, it's time to discuss strategy. My fork (mongomock-ng) is significantly ahead of upstream in features, CI, and modern Python/MongoDB support. Below is the full picture.
Current state of mongomock-ng vs upstream
Python >=3.10 (upstream: 3.9+, EOL Oct 2025)
MongoDB 7.0.34 CI (upstream: 5.0.5, EOL Oct 2024)
PyMongo 3 dropped, testing against specific 4.x minors
Automated publish on merge to develop (upstream: manual tag push)
Hi @engFelipeMonteiro , it's great to see someone taking over active maintenance of mongomock ! I'm a maintainer of a package called maggma that relies pretty heavily on it, and switching to mongomock-ng allowed me to remove the old pymongo version pin.
I'm just curious about your plans - is there anything preventing you from merging your mongomock-ng changes back into mongomock itself at this point?
Hi @rkingsbury — I've been actively developing a forward fork at mongomock-ng with MongoDB 7.0.34 CI, PyMongo 4.11+ support, and significant feature additions (geospatial, transactions, window functions, date operators, etc). Currently at v7.9.3 with 51+ tests.
I'm planning to merge these changes upstream as MongoDB 7 API support. Would love feedback on the approach — specifically whether to:
Merge incrementally (PR by PR)
Release a major version (5.0.0) with the full feature set
Also started a LinkedIn group to coordinate community feedback — you're welcome to join! All maintainers and contributors are invited.
What's included
13 upstream PRs already replicated and tested
Full geospatial: $geoIntersects, $geoWithin, $near, $nearSphere, $geoNear
Thanks @engFelipeMonteiro ! I don't have a strong opinion about whether to go PR-by-PR or all at once. The latter approach will be less work for you of course :) Mainly, I just want to keep track of when / if I should switch maggma back to mongomock over mongomock-ng.
Feature-wise, I'd say keeping relatively current with the MongoDB API support should be the main priority. In maggma, we rely mainly on straightforward methods bulk_write, aggregate, find etc. which are already well supported. If there are opportunities to improve their performance (e.g., by cython-izing, rewriting pieces in Rust or other means) that would be welcome, but I understand that may not be a high priority since I suspect most users employ mongomock for testing rather than primary functionality.
@engFelipeMonteiro I'd suggest adding the changes from your fork to this project and create a new major release. To save you the hassle of creating individual PRs you can also do a big-bang-integration. People have been desperately waiting for some development and I'm really happy to see that you have put significant work into this. However, the whole idea of seeking for new maintainers was to keep this project alive, rather than creating a new project on top of it. Thanks again for all the effort you put into this!
Activity
rkingsbury commentedon Jul 13, 2026
Hi @engFelipeMonteiro , it's great to see someone taking over active maintenance of
mongomock! I'm a maintainer of a package calledmaggmathat relies pretty heavily on it, and switching tomongomock-ngallowed me to remove the old pymongo version pin.I'm just curious about your plans - is there anything preventing you from merging your mongomock-ng changes back into
mongomockitself at this point?engFelipeMonteiro commentedon Jul 23, 2026
Hi @rkingsbury — I've been actively developing a forward fork at mongomock-ng with MongoDB 7.0.34 CI, PyMongo 4.11+ support, and significant feature additions (geospatial, transactions, window functions, date operators, etc). Currently at v7.9.3 with 51+ tests.
I'm planning to merge these changes upstream as MongoDB 7 API support. Would love feedback on the approach — specifically whether to:
Also started a LinkedIn group to coordinate community feedback — you're welcome to join! All maintainers and contributors are invited.
What's included
$geoIntersects,$geoWithin,$near,$nearSphere,$geoNearClientSession,start_transaction,commit_transaction$setWindowFields,$fill,$convert,$reduce,$merge,$unionWith, date operators, set operators, bitwise operatorsQueryProfilerfor query analysisCurrent state
Remaining gaps
$top,$bottom,$derivative, etc)$rangeandunitwindow clause formatsLooking forward to collaboration on the best path forward.
rkingsbury commentedon Aug 3, 2026
Thanks @engFelipeMonteiro ! I don't have a strong opinion about whether to go PR-by-PR or all at once. The latter approach will be less work for you of course :) Mainly, I just want to keep track of when / if I should switch
maggmaback tomongomockovermongomock-ng.Feature-wise, I'd say keeping relatively current with the MongoDB API support should be the main priority. In
maggma, we rely mainly on straightforward methodsbulk_write,aggregate,findetc. which are already well supported. If there are opportunities to improve their performance (e.g., by cython-izing, rewriting pieces in Rust or other means) that would be welcome, but I understand that may not be a high priority since I suspect most users employmongomockfor testing rather than primary functionality.mdomke commentedon Nov 17, 2026
@engFelipeMonteiro I'd suggest adding the changes from your fork to this project and create a new major release. To save you the hassle of creating individual PRs you can also do a big-bang-integration. People have been desperately waiting for some development and I'm really happy to see that you have put significant work into this. However, the whole idea of seeking for new maintainers was to keep this project alive, rather than creating a new project on top of it. Thanks again for all the effort you put into this!