Skip to content

Find replacement for mongomock #51972

Closed

Description

@eladkal

Body

The mongomock library is not maintained any more.
mongomock/mongomock#914 it's been several months since the callout for maintainers but no progress so I think we should start thinking about alternative.

We already had to limit pymongo due to incompatibilities which is not good.

# mongomock does not work with pymongo 4.11.
# See https://github.com/apache/airflow/issues/46215 and this one can be removed after
# https://github.com/mongomock/mongomock/issues/912 is closed by mongomock.
"pymongo>=4.0.0,<4.11.0",

# Additional devel dependencies (do not remove this line and add extra development dependencies)
"mongomock>=4.0.0",

The Task:
Find alternatives to mongomock, if no good alternative found suggest ideas how we can mitigate.
We should remove mongomock from our code base.

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.

Activity

  1. added
    kind:task
    on Jun 20, 2025
  2. gopidesupavan commented on Jun 30, 2025

    @gopidesupavan
    Member

    I had a look at the possible various options.

    1. https://pypi.org/project/pymongo_inmemory/#history , this is in memory it adds some overhead to download library and run tests
    2. https://github.com/dbfixtures/pytest-mongo/tree/main it relays on the running mongo db.
      will check further.. and update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:providerskind:taskprovider:mongo

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions