Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/sync-repo-settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ branchProtectionRules:
- 'cla/google'
- 'Kokoro docs-presubmit'
- 'Presubmit - Lint and Coverage'
- 'Presubmit - Unit Tests Python 3.9'

- 'Presubmit - Unit Tests Python 3.10'
- 'Presubmit - Unit Tests Python 3.11'
- 'Presubmit - Unit Tests Python 3.12'
Expand All @@ -27,7 +27,7 @@ branchProtectionRules:
- 'Presubmit - Unit Tests Ray 2.42.0 (Python 3.10)'
- 'Presubmit - Unit Tests Ray 2.42.0 (Python 3.11)'
- 'Presubmit - Unit Tests Ray 2.47.1 (Python 3.11)'
- 'Presubmit - Unit Tests LangChain (Python 3.9)'

- 'Presubmit - Unit Tests LangChain (Python 3.10)'
- 'Presubmit - Unit Tests LangChain (Python 3.11)'
- 'Presubmit - Unit Tests LangChain (Python 3.12)'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mypy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/continuous/unit.cfg
Original file line number Diff line number Diff line change
@@ -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
env_vars: {
key: "NOX_SESSION"
value: "unit"
Expand Down
29 changes: 8 additions & 21 deletions .kokoro/docker/docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,11 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/* \
&& rm -f /var/cache/apt/archives/*.deb

###################### Install python 3.9.13

# Download python 3.9.13
RUN wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz

# Extract files
RUN tar -xvf Python-3.9.13.tgz

# Install python 3.9.13
RUN ./Python-3.9.13/configure --enable-optimizations
RUN make altinstall

###################### Install pip
RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
&& python3 /tmp/get-pip.py \
&& rm /tmp/get-pip.py

# Test pip
RUN python3 -m pip

CMD ["python3.9"]
###################### Install python 3.10.13
# Download python 3.10.13
RUN wget https://www.python.org/ftp/python/3.10.13/Python-3.10.13.tgz
RUN tar -xvf Python-3.10.13.tgz
# Install python 3.10.13
RUN ./Python-3.10.13/configure --enable-optimizations
RUN make install
CMD ["python3.10"]
4 changes: 2 additions & 2 deletions .kokoro/presubmit/presubmit.cfg
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Run all sessions except system tests and docs builds
# This only runs unit tests for Python 3.9 since unit tests are required for `cover` to run
# This only runs unit tests for Python 3.10 since unit tests are required for `cover` to run
# Other Python version unit tests are run separately
env_vars: {
key: "NOX_SESSION"
value: "unit-3.9 lint lint_setup_py blacken cover"
value: "unit-3.10 lint lint_setup_py blacken cover"
}

# Run unit tests in parallel, splitting up by file
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/release.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/unit_3-9.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Run unit tests for Python 3.9
env_vars: {
key: "NOX_SESSION"
value: "unit-3.9"
value: "unit-3.10"
}

# Run unit tests in parallel, splitting up by file
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/unit_langchain_py39.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Run unit tests for LangChain on Python 3.9
env_vars: {
key: "NOX_SESSION"
value: "unit_langchain-3.9"
value: "unit_langchain-3.10"
}

# Run unit tests in parallel, splitting up by file
Expand Down
13 changes: 4 additions & 9 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions:
3.9, 3.10, 3.11, 3.12, and 3.13 on both UNIX and Windows.
3.10, 3.11, 3.12, and 3.13 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -146,10 +146,7 @@ Running System Tests
$ nox -s system-3.9 -- -k <name of test>


.. note::

System tests are only configured to run under Python 3.9.
For expediency, we do not run them in older versions of Python 3.

This alone will not run the tests. You'll need to change some local
auth settings and change some configuration in your project to
Expand Down Expand Up @@ -195,11 +192,11 @@ configure them just like the System Tests.

# Run all tests in a folder
$ cd samples/snippets
$ nox -s py-3.9
$ nox -s py-3.10

# Run a single sample test
$ cd samples/snippets
$ nox -s py-3.9 -- -k <name of test>
$ nox -s py-3.10 -- -k <name of test>

********************************************
Note About ``README`` as it pertains to PyPI
Expand All @@ -221,13 +218,11 @@ Supported Python Versions

We support:

- `Python 3.9`_
- `Python 3.10`_
- `Python 3.11`_
- `Python 3.12`_
- `Python 3.13`_

.. _Python 3.9: https://docs.python.org/3.9/
.. _Python 3.10: https://docs.python.org/3.10/
.. _Python 3.11: https://docs.python.org/3.11/
.. _Python 3.12: https://docs.python.org/3.12/
Expand All @@ -239,7 +234,7 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
.. _config: https://github.com/googleapis/python-aiplatform/blob/main/noxfile.py


We also explicitly decided to support Python 3 beginning with version 3.9.
We also explicitly decided to support Python 3 beginning with version 3.10.
Reasons for this include:

- Encouraging use of newest versions of Python 3
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ 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
^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/aiplatform_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1109,7 +1109,7 @@
+ f"({_py_version_str}). Google will not post any further "
+ f"updates to {_package_label} supporting this Python version. "
+ "Please upgrade to the latest Python version, or at "
+ f"least to Python 3.9, and then update {_package_label}.",
+ f"least to Python 3.10, and then update {_package_label}.",
FutureWarning,
)
if sys.version_info[:2] == (3, 9):
Expand Down
2 changes: 1 addition & 1 deletion google/cloud/aiplatform_v1beta1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1342,7 +1342,7 @@
+ f"({_py_version_str}). Google will not post any further "
+ f"updates to {_package_label} supporting this Python version. "
+ "Please upgrade to the latest Python version, or at "
+ f"least to Python 3.9, and then update {_package_label}.",
+ f"least to Python 3.10, and then update {_package_label}.",
FutureWarning,
)
if sys.version_info[:2] == (3, 9):
Expand Down
16 changes: 7 additions & 9 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.9.3", "2.33.0", "2.42.0"],
"3.11": ["2.42.0", "2.47.1"],
Expand Down Expand Up @@ -459,7 +459,7 @@ def cover(session):
session.run("coverage", "erase")


@nox.session(python="3.9", venv_backend="virtualenv")
@nox.session(python=DEFAULT_PYTHON_VERSION, venv_backend="virtualenv")
def docs(session):
"""Build the docs for this library."""

Expand Down Expand Up @@ -519,7 +519,7 @@ def docfx(session):
)


@nox.session(python="3.9", venv_backend="virtualenv")
@nox.session(python=DEFAULT_PYTHON_VERSION, venv_backend="virtualenv")
def gemini_docs(session):
"""Build the docs for library related to Gemini."""

Expand Down Expand Up @@ -590,9 +590,7 @@ def prerelease_deps(session):
# version, the first version we test with in the unit tests sessions has a
# constraints file containing all dependencies and extras.
with open(
CURRENT_DIRECTORY
/ "testing"
/ f"constraints-{UNIT_TEST_PYTHON_VERSIONS[0]}.txt",
CURRENT_DIRECTORY / "testing" / "constraints-3.10.txt",
encoding="utf-8",
) as constraints_file:
constraints_text = constraints_file.read()
Expand Down
8 changes: 3 additions & 5 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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",
Expand Down Expand Up @@ -164,7 +162,7 @@

s.replace(
".kokoro/test-samples-impl.sh",
"python3.9",
"python3.10",
"python3",
)

Expand Down
2 changes: 1 addition & 1 deletion pypi/_vertex_ai_placeholder/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
1 change: 0 additions & 1 deletion pypi/_vertex_ai_placeholder/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,14 +351,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",
Expand Down
2 changes: 1 addition & 1 deletion tests/system/aiplatform/test_project_id_inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def test_project_id_inference(self, shared_state):
"machine_spec": {"machine_type": "n1-standard-4"},
"replica_count": 1,
"container_spec": {
"image_uri": "python:3.9",
"image_uri": "python:3.10",
"command": [
"sh",
"-exc",
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/aiplatform/test_explain_lit.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ def test_create_lit_model_from_tensorflow_returns_model(self, set_up_sequential)

@pytest.mark.skipif(
sys.version_info < (3, 11),
reason=("temporarily skipped due to failures in python 3.9 and 3.10"),
reason=("temporarily skipped due to failures in python 3.10"),
)
@mock.patch.dict(os.environ, {"LIT_PROXY_URL": "auto"})
@pytest.mark.usefixtures(
Expand Down Expand Up @@ -622,7 +622,7 @@ def test_set_up_and_open_lit(

@pytest.mark.skipif(
sys.version_info < (3, 11),
reason=("temporarily skipped due to failures in python 3.9 and 3.10"),
reason=("temporarily skipped due to failures in python 3.10"),
)
@pytest.mark.usefixtures("init_lit_widget_mock")
@mock.patch.dict(os.environ, {"LIT_PROXY_URL": "auto"})
Expand Down
4 changes: 2 additions & 2 deletions vertexai/agent_engines/_agent_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -1778,7 +1778,7 @@ async def _method(self, **kwargs) -> Any:
factory = ClientFactory(config)
client = factory.create(a2a_agent_card)

# kokoro job uses python 3.9, replaced match with if else.
# kokoro job uses python 3.10, replaced match with if else.
if method_name == "on_message_send":
response = client.send_message(Message(**kwargs))
chunks = []
Expand Down
4 changes: 2 additions & 2 deletions vertexai/reasoning_engines/_reasoning_engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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]):
Expand Down
Loading