From 1c8a638a63736846c268540eadd9214c59df2f68 Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Tue, 28 Jan 2025 22:31:31 +0100 Subject: [PATCH 1/2] Prevent usage of pymongo 4.11 until provider not compatible --- providers/mongo/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/mongo/pyproject.toml b/providers/mongo/pyproject.toml index 45d0f508f0c77..98e385246a8aa 100644 --- a/providers/mongo/pyproject.toml +++ b/providers/mongo/pyproject.toml @@ -57,7 +57,7 @@ requires-python = "~=3.9" dependencies = [ "apache-airflow>=2.9.0", "dnspython>=1.13.0", - "pymongo>=4.0.0", + "pymongo>=4.0.0,!=4.11", ] # The dependency groups should be modified in place in the generated file From cb167490ca8d031e5cf38d41942ba3c099d18ba8 Mon Sep 17 00:00:00 2001 From: Jens Scheffler Date: Tue, 28 Jan 2025 22:35:23 +0100 Subject: [PATCH 2/2] Prevent usage of pymongo 4.11 until provider not compatible --- providers/mongo/pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/providers/mongo/pyproject.toml b/providers/mongo/pyproject.toml index 98e385246a8aa..f1c095f953f8d 100644 --- a/providers/mongo/pyproject.toml +++ b/providers/mongo/pyproject.toml @@ -57,6 +57,9 @@ requires-python = "~=3.9" dependencies = [ "apache-airflow>=2.9.0", "dnspython>=1.13.0", + # pymongo 4.11 had incompatible change leading to + # TypeError: BulkOperationBuilder.add_replace() got an unexpected keyword argument 'sort' + # See https://github.com/apache/airflow/issues/46215 "pymongo>=4.0.0,!=4.11", ]