Skip to content

Commit 204aa96

Browse files
speedstorm1copybara-github
authored andcommitted
feat: Drop support for Python 3.9 - EOL
PiperOrigin-RevId: 826675926
1 parent 8d5c777 commit 204aa96

File tree

12 files changed

+38
-39
lines changed

12 files changed

+38
-39
lines changed

.github/sync-repo-settings.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ branchProtectionRules:
1616
- 'cla/google'
1717
- 'Kokoro docs-presubmit'
1818
- 'Presubmit - Lint and Coverage'
19-
- 'Presubmit - Unit Tests Python 3.9'
2019
- 'Presubmit - Unit Tests Python 3.10'
2120
- 'Presubmit - Unit Tests Python 3.11'
2221
- 'Presubmit - Unit Tests Python 3.12'
@@ -27,7 +26,6 @@ branchProtectionRules:
2726
- 'Presubmit - Unit Tests Ray 2.42.0 (Python 3.10)'
2827
- 'Presubmit - Unit Tests Ray 2.42.0 (Python 3.11)'
2928
- 'Presubmit - Unit Tests Ray 2.47.1 (Python 3.11)'
30-
- 'Presubmit - Unit Tests LangChain (Python 3.9)'
3129
- 'Presubmit - Unit Tests LangChain (Python 3.10)'
3230
- 'Presubmit - Unit Tests LangChain (Python 3.11)'
3331
- 'Presubmit - Unit Tests LangChain (Python 3.12)'

.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', '3.14']
19+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
2020

2121
steps:
2222
- name: Checkout code

.kokoro/continuous/unit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Format: //devtools/kokoro/config/proto/build.proto
22

3-
# Run all unit test sessions, in Python 3.7 to 3.9
3+
# Run all unit test sessions, in Python 3.10 to 3.14
44
env_vars: {
55
key: "NOX_SESSION"
66
value: "unit"

.kokoro/docker/docs/Dockerfile

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ ENV DEBIAN_FRONTEND noninteractive
2020
ENV PATH /usr/local/bin:$PATH
2121

2222
# Install dependencies.
23+
# Removed libpcre2-8-0 and libpcre2-dev to prevent breaking system 'find' command
2324
RUN apt-get update \
2425
&& apt-get install -y --no-install-recommends \
2526
apt-transport-https \
@@ -60,24 +61,26 @@ RUN apt-get update \
6061
&& rm -rf /var/lib/apt/lists/* \
6162
&& rm -f /var/cache/apt/archives/*.deb
6263

63-
###################### Install python 3.9.13
64+
###################### Install python 3.12.0
6465

65-
# Download python 3.9.13
66-
RUN wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
66+
# Download python 3.12.0
67+
RUN wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz
6768

6869
# Extract files
69-
RUN tar -xvf Python-3.9.13.tgz
70+
RUN tar -xvf Python-3.12.0.tgz
7071

71-
# Install python 3.9.13
72-
RUN ./Python-3.9.13/configure --enable-optimizations
72+
# Install python 3.12.0
73+
RUN ./Python-3.12.0/configure --enable-optimizations
7374
RUN make altinstall
7475

7576
###################### Install pip
77+
# Note: get-pip.py often works better ensuring it targets the specific binary
7678
RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
77-
&& python3 /tmp/get-pip.py \
79+
&& python3.12 /tmp/get-pip.py \
7880
&& rm /tmp/get-pip.py
7981

8082
# Test pip
81-
RUN python3 -m pip
83+
RUN python3.12 -m pip
8284

83-
CMD ["python3.9"]
85+
# Explicitly set the command to the new version
86+
CMD ["python3.12"]

.kokoro/presubmit/presubmit.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Format: //devtools/kokoro/config/proto/build.proto
22

33
# Run all sessions except system tests and docs builds
4-
# This only runs unit tests for Python 3.9 since unit tests are required for `cover` to run
4+
# This only runs unit tests for Python 3.12 since unit tests are required for `cover` to run
55
# Other Python version unit tests are run separately
66
env_vars: {
77
key: "NOX_SESSION"
8-
value: "unit-3.9 lint lint_setup_py blacken cover"
8+
value: "unit-3.12 lint lint_setup_py blacken cover"
99
}
1010

1111
# Run unit tests in parallel, splitting up by file

.kokoro/presubmit/release.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Run system tests in presubmit for library releases
44
env_vars: {
55
key: "NOX_SESSION"
6-
value: "system-3.9 unit"
6+
value: "system-3.10 unit"
77
}
88

99
# Run system tests in parallel, splitting up by file

.kokoro/presubmit/unit_3-9.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Run unit tests for Python 3.9
44
env_vars: {
55
key: "NOX_SESSION"
6-
value: "unit-3.9"
6+
value: "unit-3.12"
77
}
88

99
# Run unit tests in parallel, splitting up by file

CONTRIBUTING.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ In order to add a feature:
2222
documentation.
2323

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

2727
- The feature must not add unnecessary dependencies (where
2828
"unnecessary" is of course subjective, but new dependencies should
@@ -143,12 +143,12 @@ Running System Tests
143143
$ nox -s system
144144

145145
# Run a single system test
146-
$ nox -s system-3.9 -- -k <name of test>
146+
$ nox -s system-3.10 -- -k <name of test>
147147

148148

149149
.. note::
150150

151-
System tests are only configured to run under Python 3.9.
151+
System tests are only configured to run under Python 3.10.
152152
For expediency, we do not run them in older versions of Python 3.
153153

154154
This alone will not run the tests. You'll need to change some local
@@ -195,11 +195,11 @@ configure them just like the System Tests.
195195

196196
# Run all tests in a folder
197197
$ cd samples/snippets
198-
$ nox -s py-3.9
198+
$ nox -s py-3.10
199199

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

204204
********************************************
205205
Note About ``README`` as it pertains to PyPI
@@ -221,25 +221,25 @@ Supported Python Versions
221221

222222
We support:
223223

224-
- `Python 3.9`_
225224
- `Python 3.10`_
226225
- `Python 3.11`_
227226
- `Python 3.12`_
228227
- `Python 3.13`_
228+
- `Python 3.14`_
229229

230-
.. _Python 3.9: https://docs.python.org/3.9/
231230
.. _Python 3.10: https://docs.python.org/3.10/
232231
.. _Python 3.11: https://docs.python.org/3.11/
233232
.. _Python 3.12: https://docs.python.org/3.12/
234233
.. _Python 3.13: https://docs.python.org/3.13/
234+
.. _Python 3.14: https://docs.python.org/3.14/
235235

236236

237237
Supported versions can be found in our ``noxfile.py`` `config`_.
238238

239239
.. _config: https://github.com/googleapis/python-aiplatform/blob/main/noxfile.py
240240

241241

242-
We also explicitly decided to support Python 3 beginning with version 3.9.
242+
We also explicitly decided to support Python 3 beginning with version 3.10.
243243
Reasons for this include:
244244

245245
- Encouraging use of newest versions of Python 3

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,11 @@ In order to use this library, you first need to go through the following steps:
319319

320320
Supported Python Versions
321321
^^^^^^^^^^^^^^^^^^^^^^^^^
322-
Python >= 3.9
322+
Python >= 3.10
323323

324324
Deprecated Python Versions
325325
^^^^^^^^^^^^^^^^^^^^^^^^^^
326-
Python <= 3.8.
326+
Python <= 3.9.
327327

328328
The last version of this library compatible with Python 3.8 is google-cloud-aiplatform==1.90.0.
329329

mypy.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[mypy]
2-
python_version = 3.7
2+
python_version = 3.13
33
namespace_packages = True

0 commit comments

Comments
 (0)