Skip to content

Commit 81452db

Browse files
authored
chore(community): allow Python 3.14, update deps (#1334)
- Expand to permit Python 3.14 - Update dependencies ## Temporary Dependency Removal - `google-cloud-bigquery` (from `'bigquery'` extra) - `google-cloud-documentai-toolbox` (from `'docai'` extra) Due to upstream compatiblity issues with Python 3.13+ googleapis/python-documentai-toolbox#388 googleapis/python-documentai-toolbox#389 googleapis/python-bigquery#2316 ## Potentially breaking For users who: - Install with `pip install langchain-google-community[bigquery]` - Install with `pip install langchain-google-community[docai]` - Import `BigQueryLoader` or Document AI components directly ### Workaround ``` pip install langchain-google-community pip install google-cloud-bigquery>=3.21.0 pip install google-cloud-documentai-toolbox>=0.13.3a0 # if Python < 3.13 ``` These dependencies will be restored once upstream fixes are available. --- Closes #1319
1 parent 5c4b5d8 commit 81452db

File tree

6 files changed

+1264
-1297
lines changed

6 files changed

+1264
-1297
lines changed

libs/community/pyproject.toml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ readme = "README.md"
1010
authors = []
1111

1212
version = "3.0.0"
13-
requires-python = ">=3.10.0,<3.13.0"
13+
requires-python = ">=3.10.0,<3.14.0"
1414
dependencies = [
1515
"langchain-core>=1.0.0,<2.0.0",
1616
"langchain-community>=0.4.0,<2.0.0",
@@ -31,12 +31,12 @@ Slack = "https://www.langchain.com/join-community"
3131
Reddit = "https://www.reddit.com/r/LangChain/"
3232

3333
[project.optional-dependencies]
34-
bigquery = ["google-cloud-bigquery>=3.21.0,<4.0.0"]
34+
#bigquery = ["google-cloud-bigquery>=3.21.0,<4.0.0"]
3535
calendar = ["google-auth>=2.36.0,<3.0.0", "google-auth-oauthlib>=1.2.0,<2.0.0"]
3636
docai = [
3737
"google-cloud-documentai>=2.26.0,<3.0.0",
3838
"google-cloud-contentwarehouse>=0.7.7,<1.0.0",
39-
"google-cloud-documentai-toolbox>=0.13.3a0,<1.0.0",
39+
#"google-cloud-documentai-toolbox>=0.13.3a0,<1.0.0",
4040
"gapic-google-longrunning>=0.11.2,<1.0.0",
4141
]
4242
drive = ["google-auth-httplib2>=0.2.0,<1.0.0", "google-auth-oauthlib>=1.2.0,<2.0.0"]
@@ -61,8 +61,8 @@ test = [
6161
"pytest-retry>=1.7.0,<2.0.0",
6262
"pytest-socket>=0.7.0,<1.0.0",
6363
"google-cloud-documentai>=2.24.2,<3.0.0",
64-
"google-cloud-documentai-toolbox>=0.13.3a0,<1.0.0; python_version<'3.13'",
65-
"google-cloud-bigquery>=3.19.0,<4.0.0",
64+
#"google-cloud-documentai-toolbox>=0.13.3a0,<1.0.0",
65+
#"google-cloud-bigquery>=3.21.0,<4.0.0",
6666
"google-cloud-discoveryengine>=0.11.14,<1.0.0",
6767
"cloudpickle>=3.0.0,<4.0.0",
6868
]
@@ -72,7 +72,7 @@ test_integration = [
7272
]
7373

7474
lint = [
75-
"ruff>=0.12.10,<1",
75+
"ruff>=0.14.0,<1",
7676
]
7777

7878
typing = [
@@ -92,7 +92,6 @@ dev = [
9292
]
9393

9494
[tool.ruff]
95-
target-version = "py39"
9695
fix = true
9796

9897
[tool.ruff.format]

libs/community/tests/integration_tests/feature_store/test_feature_store_bq_vectorstore.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def store_bq_vectorstore(request: pytest.FixtureRequest) -> BigQueryVectorStore:
2929
Example:
3030
export PROJECT_ID=...
3131
"""
32-
from google.cloud import bigquery
32+
from google.cloud import bigquery # type: ignore[attr-defined]
3333

3434
embedding_model = FakeEmbeddings(size=EMBEDDING_SIZE)
3535
TestBigQueryVectorStore_bq_vectorstore.store_bq_vectorstore = BigQueryVectorStore(
@@ -68,7 +68,7 @@ def existing_store_bq_vectorstore(
6868
Example:
6969
export PROJECT_ID=...
7070
"""
71-
from google.cloud import bigquery
71+
from google.cloud import bigquery # type: ignore[attr-defined]
7272

7373
embedding_model = FakeEmbeddings(size=EMBEDDING_SIZE)
7474
TestBigQueryVectorStore_bq_vectorstore.existing_store_bq_vectorstore = (

libs/community/tests/integration_tests/feature_store/test_feature_store_fs_vectorstore.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def store_fs_vectorstore(request: pytest.FixtureRequest) -> VertexFSVectorStore:
2929
Example:
3030
export PROJECT_ID=...
3131
"""
32-
from google.cloud import bigquery
32+
from google.cloud import bigquery # type: ignore[attr-defined]
3333

3434
embedding_model = FakeEmbeddings(size=EMBEDDING_SIZE)
3535

libs/community/tests/integration_tests/test_bigquery.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55

66
@pytest.mark.extended
7+
@pytest.mark.xfail(reason="TEMPORARY until dependency issues are resolved.")
78
def test_bigquery_loader_no_options() -> None:
89
loader = BigQueryLoader("SELECT 1 AS a, 2 AS b")
910
docs = loader.load()
@@ -14,6 +15,7 @@ def test_bigquery_loader_no_options() -> None:
1415

1516

1617
@pytest.mark.extended
18+
@pytest.mark.xfail(reason="TEMPORARY until dependency issues are resolved.")
1719
def test_bigquery_loader_page_content_columns() -> None:
1820
loader = BigQueryLoader(
1921
"SELECT 1 AS a, 2 AS b UNION ALL SELECT 3 AS a, 4 AS b",
@@ -30,6 +32,7 @@ def test_bigquery_loader_page_content_columns() -> None:
3032

3133

3234
@pytest.mark.extended
35+
@pytest.mark.xfail(reason="TEMPORARY until dependency issues are resolved.")
3336
def test_bigquery_loader_metadata_columns() -> None:
3437
loader = BigQueryLoader(
3538
"SELECT 1 AS a, 2 AS b",

libs/community/tests/integration_tests/test_docai.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010

1111
@pytest.mark.extended
12+
@pytest.mark.xfail(reason="TEMPORARY until dependency issues are resolved.")
1213
def test_docai_layout_parser() -> None:
1314
processor_name = os.environ["PROCESSOR_NAME"]
1415
parser = DocAIParser(processor_name=processor_name, location="us")

0 commit comments

Comments
 (0)