This is an automated email from the ASF dual-hosted git repository.

taragolis pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 3400dfe0be Limit `cohere` to <5 (#38348)
3400dfe0be is described below

commit 3400dfe0bec29e6fde06a1ab7a7bc0b381f7c128
Author: Andrey Anshin <andrey.ans...@taragol.is>
AuthorDate: Thu Mar 21 02:12:55 2024 +0400

    Limit `cohere` to <5 (#38348)
---
 airflow/providers/cohere/hooks/cohere.py | 2 +-
 airflow/providers/cohere/provider.yaml   | 2 +-
 generated/provider_dependencies.json     | 2 +-
 pyproject.toml                           | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/airflow/providers/cohere/hooks/cohere.py 
b/airflow/providers/cohere/hooks/cohere.py
index 3b60c9060c..2ce40c74d1 100644
--- a/airflow/providers/cohere/hooks/cohere.py
+++ b/airflow/providers/cohere/hooks/cohere.py
@@ -53,7 +53,7 @@ class CohereHook(BaseHook):
         self.max_retries = max_retries
 
     @cached_property
-    def get_conn(self) -> cohere.Client:
+    def get_conn(self) -> cohere.Client:  # type: ignore[override]
         conn = self.get_connection(self.conn_id)
         return cohere.Client(
             api_key=conn.password, timeout=self.timeout, 
max_retries=self.max_retries, api_url=conn.host
diff --git a/airflow/providers/cohere/provider.yaml 
b/airflow/providers/cohere/provider.yaml
index f3e218b8f3..43d3f35372 100644
--- a/airflow/providers/cohere/provider.yaml
+++ b/airflow/providers/cohere/provider.yaml
@@ -42,7 +42,7 @@ integrations:
 
 dependencies:
   - apache-airflow>=2.6.0
-  - cohere>=4.37
+  - cohere>=4.37,<5
 
 hooks:
   - integration-name: Cohere
diff --git a/generated/provider_dependencies.json 
b/generated/provider_dependencies.json
index 66d19d2563..d09846e29a 100644
--- a/generated/provider_dependencies.json
+++ b/generated/provider_dependencies.json
@@ -330,7 +330,7 @@
   "cohere": {
     "deps": [
       "apache-airflow>=2.6.0",
-      "cohere>=4.37"
+      "cohere>=4.37,<5"
     ],
     "devel-deps": [],
     "cross-providers-deps": [],
diff --git a/pyproject.toml b/pyproject.toml
index a65d8695d0..277a212634 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -663,7 +663,7 @@ cncf-kubernetes = [ # source: 
airflow/providers/cncf/kubernetes/provider.yaml
   "kubernetes_asyncio>=28.1.0,<=29.0.0",
 ]
 cohere = [ # source: airflow/providers/cohere/provider.yaml
-  "cohere>=4.37",
+  "cohere>=4.37,<5",
 ]
 common-io = [] # source: airflow/providers/common/io/provider.yaml
 common-sql = [ # source: airflow/providers/common/sql/provider.yaml

Reply via email to