This is an automated email from the ASF dual-hosted git repository.
amoghdesai 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 4af10c9c386 Bumping pinecone sdk to 7.0.0 to improve podspec handling
(#50868)
4af10c9c386 is described below
commit 4af10c9c3865ab0a1d907df1f3b647ddcfd1d55d
Author: Amogh Desai <[email protected]>
AuthorDate: Wed May 21 14:30:01 2025 +0530
Bumping pinecone sdk to 7.0.0 to improve podspec handling (#50868)
* Fixing mypy checks on pinecone provider
* bump pinecone to 7.0.0
---
providers/pinecone/pyproject.toml | 2 +-
providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/providers/pinecone/pyproject.toml
b/providers/pinecone/pyproject.toml
index bd6b11e88bc..691654af213 100644
--- a/providers/pinecone/pyproject.toml
+++ b/providers/pinecone/pyproject.toml
@@ -58,7 +58,7 @@ requires-python = "~=3.9"
# After you modify the dependencies, and rebuild your Breeze CI image with
``breeze ci-image build``
dependencies = [
"apache-airflow>=2.10.0",
- "pinecone>=3.1.0",
+ "pinecone>=7.0.0",
]
[dependency-groups]
diff --git
a/providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py
b/providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py
index 932fd04acd6..cfb354974b5 100644
--- a/providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py
+++ b/providers/pinecone/src/airflow/providers/pinecone/hooks/pinecone.py
@@ -24,7 +24,7 @@ import os
from functools import cached_property
from typing import TYPE_CHECKING, Any
-from pinecone import Pinecone, PodSpec, ServerlessSpec
+from pinecone import Pinecone, PodSpec, PodType, ServerlessSpec
from airflow.hooks.base import BaseHook
@@ -182,7 +182,7 @@ class PineconeHook(BaseHook):
replicas: int | None = None,
shards: int | None = None,
pods: int | None = None,
- pod_type: str | None = "p1.x1",
+ pod_type: str | PodType = PodType.P1_X1,
metadata_config: dict | None = None,
source_collection: str | None = None,
environment: str | None = None,
@@ -203,7 +203,7 @@ class PineconeHook(BaseHook):
replicas=replicas,
shards=shards,
pods=pods,
- pod_type=pod_type,
+ pod_type=pod_type if isinstance(pod_type, PodType) else
PodType(pod_type),
metadata_config=metadata_config,
source_collection=source_collection,
)