Skip to content

Commit 4618729

Browse files
speedstorm1copybara-github
authored andcommitted
feat: add initial support for Python v3.14
PiperOrigin-RevId: 825257152
1 parent 92d8b2a commit 4618729

File tree

7 files changed

+40
-8
lines changed

7 files changed

+40
-8
lines changed

.github/sync-repo-settings.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ branchProtectionRules:
2121
- 'Presubmit - Unit Tests Python 3.11'
2222
- 'Presubmit - Unit Tests Python 3.12'
2323
- 'Presubmit - Unit Tests Python 3.13'
24+
- 'Presubmit - Unit Tests Python 3.14'
2425
- 'Presubmit - Unit Tests Ray 2.9.3'
2526
- 'Presubmit - Unit Tests Ray 2.33.0'
2627
- 'Presubmit - Unit Tests Ray 2.42.0 (Python 3.10)'

.github/workflows/mypy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
strategy:
1818
matrix:
19-
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
19+
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
2020

2121
steps:
2222
- name: Checkout code

.kokoro/presubmit/unit_3-14.cfg

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Run unit tests for Python 3.14
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "unit-3.14"
7+
}
8+
9+
# Run unit tests in parallel, splitting up by file
10+
env_vars: {
11+
key: "PYTEST_ADDOPTS"
12+
value: "-n=auto --dist=loadscope"
13+
}

noxfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@
5353
"recommonmark",
5454
)
5555

56-
UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
57-
UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
58-
UNIT_TEST_AG2_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
59-
UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13"]
56+
UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
57+
UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
58+
UNIT_TEST_AG2_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
59+
UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
6060
PYTHON_TO_RAY_VERSIONS = {
6161
"3.10": ["2.9.3", "2.33.0", "2.42.0"],
6262
"3.11": ["2.42.0", "2.47.1"],

owlbot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
templated_files = common.py_library(
100100
cov_level=98,
101101
system_test_python_versions=["3.9"],
102-
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13"],
102+
unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"],
103103
unit_test_extras=["testing"],
104104
system_test_extras=["testing"],
105105
microgenerator=True,

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
lit_extra_require = [
5858
"tensorflow >= 2.3.0, <3.0.0; python_version<'3.13'",
5959
"pandas >= 1.0.0",
60-
"lit-nlp == 0.4.0",
60+
"lit-nlp == 0.4.0; python_version<'3.14'",
6161
"explainable-ai-sdk >= 1.0.0; python_version<'3.13'",
6262
]
6363
featurestore_extra_require = [
@@ -249,7 +249,7 @@
249249
# aiohttp is required for async rest tests (need google-auth[aiohttp],
250250
# but can't specify extras in constraints files)
251251
"aiohttp",
252-
"bigframes; python_version>='3.10'",
252+
"bigframes; python_version>='3.10' and python_version<'3.14'",
253253
# google-api-core 2.x is required since kfp requires protobuf > 4
254254
"google-api-core >= 2.11, < 3.0.0",
255255
"grpcio-testing",
@@ -260,6 +260,7 @@
260260
"pytest-cov",
261261
"mock",
262262
"pytest-xdist",
263+
"Pillow",
263264
"scikit-learn<1.6.0; python_version<='3.10'",
264265
"scikit-learn; python_version>'3.10'",
265266
# Lazy import requires > 2.12.0
@@ -356,6 +357,7 @@
356357
"Programming Language :: Python :: 3.11",
357358
"Programming Language :: Python :: 3.12",
358359
"Programming Language :: Python :: 3.13",
360+
"Programming Language :: Python :: 3.14",
359361
"Topic :: Internet",
360362
"Topic :: Software Development :: Libraries :: Python Modules",
361363
],

testing/constraints-3.14.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# This constraints file is required for unit tests.
3+
# List all library dependencies and extras in this file.
4+
google-api-core==2.21.0 # Tests google-api-core with rest async support
5+
google-auth==2.35.0 # Tests google-auth with rest async support
6+
proto-plus
7+
mock==4.0.2
8+
google-cloud-storage==2.10.0 # Increased for kfp 2.0 compatibility
9+
packaging==24.1 # Increased to unbreak canonicalize_version error (b/377774673)
10+
pytest-xdist==3.3.1 # Pinned to unbreak unit tests
11+
ray==2.5.0 # Pinned until 2.9.3 is verified for Ray tests
12+
ipython==8.22.2 # Pinned to unbreak TypeAliasType import error
13+
google-adk==0.0.2
14+
google-genai>=1.10.0
15+
google-vizier==0.1.21
16+
pyarrow>=18.0.0

0 commit comments

Comments
 (0)