From 077c33ef5def87e10c6369cddd76e02f6a14b686 Mon Sep 17 00:00:00 2001 From: Jens Scheffler <95105677+jscheffl@users.noreply.github.com> Date: Tue, 28 Jan 2025 23:18:57 +0100 Subject: [PATCH] Bugfix/prevent pymongo 4.11 (#46216) * Prevent usage of pymongo 4.11 until provider not compatible * Prevent usage of pymongo 4.11 until provider not compatible --- providers/mongo/pyproject.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/providers/mongo/pyproject.toml b/providers/mongo/pyproject.toml index 45d0f508f0c77..f1c095f953f8d 100644 --- a/providers/mongo/pyproject.toml +++ b/providers/mongo/pyproject.toml @@ -57,7 +57,10 @@ requires-python = "~=3.9" dependencies = [ "apache-airflow>=2.9.0", "dnspython>=1.13.0", - "pymongo>=4.0.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", ] # The dependency groups should be modified in place in the generated file