diff --git a/.kokoro/continuous/unit.cfg b/.kokoro/continuous/unit.cfg index 57188a42d1..8451ad5380 100644 --- a/.kokoro/continuous/unit.cfg +++ b/.kokoro/continuous/unit.cfg @@ -1,6 +1,6 @@ # Format: //devtools/kokoro/config/proto/build.proto -# Run all unit test sessions, in Python 3.7 to 3.9 +# Run all unit test sessions, in Python 3.10 to 3.13 env_vars: { key: "NOX_SESSION" value: "unit" diff --git a/.kokoro/docker/docs/Dockerfile b/.kokoro/docker/docs/Dockerfile index e8ee8191ee..93abeb68b7 100644 --- a/.kokoro/docker/docs/Dockerfile +++ b/.kokoro/docker/docs/Dockerfile @@ -60,16 +60,16 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && rm -f /var/cache/apt/archives/*.deb -###################### Install python 3.9.13 +###################### Install python 3.10.20 -# Download python 3.9.13 -RUN wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz +# Download python 3.10.20 +RUN wget https://www.python.org/ftp/python/3.10.20/Python-3.10.20.tgz # Extract files -RUN tar -xvf Python-3.9.13.tgz +RUN tar -xvf Python-3.10.20.tgz -# Install python 3.9.13 -RUN ./Python-3.9.13/configure --enable-optimizations +# Install python 3.10.20 +RUN ./Python-3.10.20/configure --enable-optimizations RUN make altinstall ###################### Install pip @@ -80,4 +80,4 @@ RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \ # Test pip RUN python3 -m pip -CMD ["python3.9"] +CMD ["python3.10"] diff --git a/.kokoro/presubmit/release.cfg b/.kokoro/presubmit/release.cfg index bb84c062a9..a53b631c60 100644 --- a/.kokoro/presubmit/release.cfg +++ b/.kokoro/presubmit/release.cfg @@ -3,7 +3,7 @@ # Run system tests in presubmit for library releases env_vars: { key: "NOX_SESSION" - value: "system-3.9 unit" + value: "system-3.10 unit" } # Run system tests in parallel, splitting up by file diff --git a/.kokoro/presubmit/unit_3-9.cfg b/.kokoro/presubmit/unit_3-9.cfg deleted file mode 100644 index e97dc78539..0000000000 --- a/.kokoro/presubmit/unit_3-9.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Run unit tests for Python 3.9 -env_vars: { - key: "NOX_SESSION" - value: "unit-3.9" -} - -# Run unit tests in parallel, splitting up by file -env_vars: { - key: "PYTEST_ADDOPTS" - value: "-n=auto --dist=loadscope" -} diff --git a/.kokoro/presubmit/unit_langchain_py39.cfg b/.kokoro/presubmit/unit_langchain_py39.cfg deleted file mode 100644 index 5b3c7bb9bf..0000000000 --- a/.kokoro/presubmit/unit_langchain_py39.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Run unit tests for LangChain on Python 3.9 -env_vars: { - key: "NOX_SESSION" - value: "unit_langchain-3.9" -} - -# Run unit tests in parallel, splitting up by file -env_vars: { - key: "PYTEST_ADDOPTS" - value: "-n=auto --dist=loadscope" -} diff --git a/.kokoro/samples/python3.9/common.cfg b/.kokoro/samples/python3.9/common.cfg deleted file mode 100644 index 5a549c80fc..0000000000 --- a/.kokoro/samples/python3.9/common.cfg +++ /dev/null @@ -1,40 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -# Build logs will be here -action { - define_artifacts { - regex: "**/*sponge_log.xml" - } -} - -# Specify which tests to run -env_vars: { - key: "RUN_TESTS_SESSION" - value: "py-3.9" -} - -# Declare build specific Cloud project. -env_vars: { - key: "BUILD_SPECIFIC_GCLOUD_PROJECT" - value: "ucaip-sample-tests" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/python-aiplatform/.kokoro/test-samples.sh" -} - -# Configure the docker image for kokoro-trampoline. -env_vars: { - key: "TRAMPOLINE_IMAGE" - value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" -} - -# Download secrets for samples -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" - -# Download trampoline resources. -gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" - -# Use the trampoline script to run in docker. -build_file: "python-aiplatform/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.9/continuous.cfg b/.kokoro/samples/python3.9/continuous.cfg deleted file mode 100644 index a1c8d9759c..0000000000 --- a/.kokoro/samples/python3.9/continuous.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "INSTALL_LIBRARY_FROM_SOURCE" - value: "True" -} \ No newline at end of file diff --git a/.kokoro/samples/python3.9/periodic-head.cfg b/.kokoro/samples/python3.9/periodic-head.cfg deleted file mode 100644 index 88d5235e34..0000000000 --- a/.kokoro/samples/python3.9/periodic-head.cfg +++ /dev/null @@ -1,11 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "INSTALL_LIBRARY_FROM_SOURCE" - value: "True" -} - -env_vars: { - key: "TRAMPOLINE_BUILD_FILE" - value: "github/python-aiplatform/.kokoro/test-samples-against-head.sh" -} diff --git a/.kokoro/samples/python3.9/periodic.cfg b/.kokoro/samples/python3.9/periodic.cfg deleted file mode 100644 index 71cd1e597e..0000000000 --- a/.kokoro/samples/python3.9/periodic.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "INSTALL_LIBRARY_FROM_SOURCE" - value: "False" -} diff --git a/.kokoro/samples/python3.9/presubmit.cfg b/.kokoro/samples/python3.9/presubmit.cfg deleted file mode 100644 index a1c8d9759c..0000000000 --- a/.kokoro/samples/python3.9/presubmit.cfg +++ /dev/null @@ -1,6 +0,0 @@ -# Format: //devtools/kokoro/config/proto/build.proto - -env_vars: { - key: "INSTALL_LIBRARY_FROM_SOURCE" - value: "True" -} \ No newline at end of file diff --git a/README.rst b/README.rst index 6ecea0ed73..cc48fc1b5f 100644 --- a/README.rst +++ b/README.rst @@ -319,11 +319,11 @@ In order to use this library, you first need to go through the following steps: Supported Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^ -Python >= 3.9 +Python >= 3.10 Deprecated Python Versions ^^^^^^^^^^^^^^^^^^^^^^^^^^ -Python <= 3.8. +Python <= 3.9. The last version of this library compatible with Python 3.8 is google-cloud-aiplatform==1.90.0. diff --git a/noxfile.py b/noxfile.py index 2aff79506b..ce2d2c3865 100644 --- a/noxfile.py +++ b/noxfile.py @@ -53,10 +53,10 @@ "recommonmark", ) -UNIT_TEST_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] -UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] -UNIT_TEST_AG2_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] -UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS = ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] +UNIT_TEST_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] +UNIT_TEST_LANGCHAIN_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] +UNIT_TEST_AG2_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] +UNIT_TEST_LLAMA_INDEX_PYTHON_VERSIONS = ["3.10", "3.11", "3.12", "3.13", "3.14"] PYTHON_TO_RAY_VERSIONS = { "3.10": ["2.33.0", "2.42.0"], "3.11": ["2.42.0", "2.47.1"], @@ -459,7 +459,7 @@ def cover(session): session.run("coverage", "erase") -@nox.session(python="3.9", venv_backend="virtualenv") +@nox.session(python="3.10", venv_backend="virtualenv") def docs(session): """Build the docs for this library.""" @@ -519,7 +519,7 @@ def docfx(session): ) -@nox.session(python="3.9", venv_backend="virtualenv") +@nox.session(python="3.10", venv_backend="virtualenv") def gemini_docs(session): """Build the docs for library related to Gemini.""" diff --git a/owlbot.py b/owlbot.py index 569c043bfa..cf7ec5a176 100644 --- a/owlbot.py +++ b/owlbot.py @@ -83,7 +83,7 @@ "noxfile.py", "testing", "docs/conf.py", - "*.tar.gz" + "*.tar.gz", ], ) has_generator_updates = True @@ -98,8 +98,8 @@ templated_files = common.py_library( cov_level=98, - system_test_python_versions=["3.9"], - unit_test_python_versions=["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"], + system_test_python_versions=["3.10"], + unit_test_python_versions=["3.10", "3.11", "3.12", "3.13", "3.14"], unit_test_extras=["testing"], system_test_extras=["testing"], microgenerator=True, @@ -122,12 +122,10 @@ ".kokoro/samples/python3.8/**", # exclude sample configs so periodic samples are tested against main # instead of pypi - ".kokoro/samples/python3.9/common.cfg", ".kokoro/samples/python3.10/common.cfg", ".kokoro/samples/python3.11/common.cfg", ".kokoro/samples/python3.12/common.cfg", ".kokoro/samples/python3.13/common.cfg", - ".kokoro/samples/python3.9/periodic.cfg", ".kokoro/samples/python3.10/periodic.cfg", ".kokoro/samples/python3.11/periodic.cfg", ".kokoro/samples/python3.12/periodic.cfg", diff --git a/pypi/_vertex_ai_placeholder/pyproject.toml b/pypi/_vertex_ai_placeholder/pyproject.toml index ab4d22f39e..0dd44ea941 100644 --- a/pypi/_vertex_ai_placeholder/pyproject.toml +++ b/pypi/_vertex_ai_placeholder/pyproject.toml @@ -11,7 +11,7 @@ authors = [ license = {text = "Apache 2.0"} description = "Please run pip install vertexai to use the Vertex SDK." readme = "README.md" -requires-python = ">=3.9" +requires-python = ">=3.10" [project.urls] repository = "https://github.com/googleapis/python-aiplatform.git" \ No newline at end of file diff --git a/pypi/_vertex_ai_placeholder/setup.py b/pypi/_vertex_ai_placeholder/setup.py index 30d9c16f27..190b1390cb 100644 --- a/pypi/_vertex_ai_placeholder/setup.py +++ b/pypi/_vertex_ai_placeholder/setup.py @@ -236,7 +236,6 @@ "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff --git a/setup.py b/setup.py index aa0ab40092..6860a4c993 100644 --- a/setup.py +++ b/setup.py @@ -358,14 +358,13 @@ "llama_index": llama_index_extra_require, "llama_index_testing": llama_index_testing_extra_require, }, - python_requires=">=3.9", + python_requires=">=3.10", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", diff --git a/vertexai/_genai/types/common.py b/vertexai/_genai/types/common.py index 81c505f81a..13118e782c 100644 --- a/vertexai/_genai/types/common.py +++ b/vertexai/_genai/types/common.py @@ -8349,14 +8349,12 @@ class CreateAgentEngineConfig(_common.BaseModel): - If `source_packages` is specified, the agent framework will default to "custom".""", ) - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] = ( - Field( - default=None, - description="""The Python version to be used for the Agent Engine. + python_version: Optional[Literal["3.10", "3.11", "3.12", "3.13", "3.14"]] = Field( + default=None, + description="""The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". + Supported versions: "3.10", "3.11", "3.12", "3.13", "3.14". """, - ) ) build_options: Optional[dict[str, list[str]]] = Field( default=None, @@ -8496,10 +8494,10 @@ class CreateAgentEngineConfigDict(TypedDict, total=False): - If `source_packages` is specified, the agent framework will default to "custom".""" - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] + python_version: Optional[Literal["3.10", "3.11", "3.12", "3.13", "3.14"]] """The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". + Supported versions: "3.10", "3.11", "3.12", "3.13", "3.14". """ build_options: Optional[dict[str, list[str]]] @@ -9018,14 +9016,12 @@ class UpdateAgentEngineConfig(_common.BaseModel): - If `source_packages` is specified, the agent framework will default to "custom".""", ) - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] = ( - Field( - default=None, - description="""The Python version to be used for the Agent Engine. + python_version: Optional[Literal["3.10", "3.11", "3.12", "3.13", "3.14"]] = Field( + default=None, + description="""The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". + Supported versions: "3.10", "3.11", "3.12", "3.13", "3.14". """, - ) ) build_options: Optional[dict[str, list[str]]] = Field( default=None, @@ -9170,10 +9166,10 @@ class UpdateAgentEngineConfigDict(TypedDict, total=False): - If `source_packages` is specified, the agent framework will default to "custom".""" - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] + python_version: Optional[Literal["3.10", "3.11", "3.12", "3.13", "3.14"]] """The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". + Supported versions: "3.10", "3.11", "3.12", "3.13", "3.14". """ build_options: Optional[dict[str, list[str]]] @@ -17210,14 +17206,12 @@ class AgentEngineConfig(_common.BaseModel): - If `source_packages` is specified, the agent framework will default to "custom".""", ) - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] = ( - Field( - default=None, - description="""The Python version to be used for the Agent Engine. + python_version: Optional[Literal["3.10", "3.11", "3.12", "3.13", "3.14"]] = Field( + default=None, + description="""The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". + Supported versions: "3.10", "3.11", "3.12", "3.13", "3.14". """, - ) ) build_options: Optional[dict[str, list[str]]] = Field( default=None, @@ -17400,10 +17394,10 @@ class AgentEngineConfigDict(TypedDict, total=False): - If `source_packages` is specified, the agent framework will default to "custom".""" - python_version: Optional[Literal["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]] + python_version: Optional[Literal["3.10", "3.11", "3.12", "3.13", "3.14"]] """The Python version to be used for the Agent Engine. If not specified, it will use the current Python version of the environment. - Supported versions: "3.9", "3.10", "3.11", "3.12", "3.13", "3.14". + Supported versions: "3.10", "3.11", "3.12", "3.13", "3.14". """ build_options: Optional[dict[str, list[str]]] diff --git a/vertexai/agent_engines/_agent_engines.py b/vertexai/agent_engines/_agent_engines.py index dd4e35269d..1da62a0681 100644 --- a/vertexai/agent_engines/_agent_engines.py +++ b/vertexai/agent_engines/_agent_engines.py @@ -53,7 +53,7 @@ _LOGGER = _utils.LOGGER -_SUPPORTED_PYTHON_VERSIONS = ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14") +_SUPPORTED_PYTHON_VERSIONS = ("3.10", "3.11", "3.12", "3.13", "3.14") _DEFAULT_GCS_DIR_NAME = "agent_engine" _BLOB_FILENAME = "agent_engine.pkl" _REQUIREMENTS_FILE = "requirements.txt" diff --git a/vertexai/reasoning_engines/_reasoning_engines.py b/vertexai/reasoning_engines/_reasoning_engines.py index 322bf2a2d4..7d94cda0bc 100644 --- a/vertexai/reasoning_engines/_reasoning_engines.py +++ b/vertexai/reasoning_engines/_reasoning_engines.py @@ -48,7 +48,7 @@ _LOGGER = base.Logger(__name__) -_SUPPORTED_PYTHON_VERSIONS = ("3.9", "3.10", "3.11", "3.12", "3.13", "3.14") +_SUPPORTED_PYTHON_VERSIONS = ("3.10", "3.11", "3.12", "3.13", "3.14") _DEFAULT_GCS_DIR_NAME = "reasoning_engine" _BLOB_FILENAME = "reasoning_engine.pkl" _REQUIREMENTS_FILE = "requirements.txt" @@ -224,7 +224,7 @@ def create( use for staging the artifacts needed. sys_version (str): Optional. The Python system version used. Currently supports any - of "3.9", "3.10", "3.11", "3.12", "3.13". If not specified, + of "3.10", "3.11", "3.12", "3.13". If not specified, it defaults to the "{major}.{minor}" attributes of sys.version_info. extra_packages (Sequence[str]):