Skip to content

Commit 3849883

Browse files
chore(python): Update the python version in docs presubmit to use 3.10 (#914)
Source-Link: googleapis/synthtool@de3def6 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:a1c5112b81d645f5bbc4d4bbc99d7dcb5089a52216c0e3fb1203a0eeabadd7d5 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 538235d commit 3849883

File tree

9 files changed

+97
-61
lines changed

9 files changed

+97
-61
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2024 Google LLC
1+
# Copyright 2025 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:5a4c19d17e597b92d786e569be101e636c9c2817731f80a5adec56b2aa8fe070
17-
# created: 2024-04-12T11:35:58.922854369Z
16+
digest: sha256:a1c5112b81d645f5bbc4d4bbc99d7dcb5089a52216c0e3fb1203a0eeabadd7d5
17+
# created: 2025-01-02T23:09:36.975468657Z

.kokoro/docker/docs/Dockerfile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Use of this source code is governed by a BSD-style
44
# license that can be found in the LICENSE file or at
55
# https://developers.google.com/open-source/licenses/bsd
66

7-
from ubuntu:22.04
7+
from ubuntu:24.04
88

99
ENV DEBIAN_FRONTEND noninteractive
1010

@@ -32,7 +32,6 @@ RUN apt-get update \
3232
libssl-dev \
3333
libsqlite3-dev \
3434
portaudio19-dev \
35-
python3-distutils \
3635
redis-server \
3736
software-properties-common \
3837
ssh \
@@ -52,28 +51,31 @@ RUN apt-get update \
5251
&& rm -rf /var/lib/apt/lists/* \
5352
&& rm -f /var/cache/apt/archives/*.deb
5453

55-
###################### Install python 3.9.13
5654

57-
# Download python 3.9.13
58-
RUN wget https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
55+
###################### Install python 3.10.14 for docs/docfx session
56+
57+
# Download python 3.10.14
58+
RUN wget https://www.python.org/ftp/python/3.10.14/Python-3.10.14.tgz
5959

6060
# Extract files
61-
RUN tar -xvf Python-3.9.13.tgz
61+
RUN tar -xvf Python-3.10.14.tgz
6262

63-
# Install python 3.9.13
64-
RUN ./Python-3.9.13/configure --enable-optimizations
63+
# Install python 3.10.14
64+
RUN ./Python-3.10.14/configure --enable-optimizations
6565
RUN make altinstall
6666

67+
ENV PATH /usr/local/bin/python3.10:$PATH
68+
6769
###################### Install pip
6870
RUN wget -O /tmp/get-pip.py 'https://bootstrap.pypa.io/get-pip.py' \
69-
&& python3 /tmp/get-pip.py \
71+
&& python3.10 /tmp/get-pip.py \
7072
&& rm /tmp/get-pip.py
7173

7274
# Test pip
73-
RUN python3 -m pip
75+
RUN python3.10 -m pip
7476

7577
# Install build requirements
7678
COPY requirements.txt /requirements.txt
77-
RUN python3 -m pip install --require-hashes -r requirements.txt
79+
RUN python3.10 -m pip install --require-hashes -r requirements.txt
7880

79-
CMD ["python3.8"]
81+
CMD ["python3.10"]
Lines changed: 61 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,72 @@
11
#
2-
# This file is autogenerated by pip-compile with Python 3.9
2+
# This file is autogenerated by pip-compile with Python 3.10
33
# by the following command:
44
#
5-
# pip-compile --allow-unsafe --generate-hashes requirements.in
5+
# pip-compile --allow-unsafe --generate-hashes synthtool/gcp/templates/python_library/.kokoro/docker/docs/requirements.in
66
#
7-
argcomplete==3.2.3 \
8-
--hash=sha256:bf7900329262e481be5a15f56f19736b376df6f82ed27576fa893652c5de6c23 \
9-
--hash=sha256:c12355e0494c76a2a7b73e3a59b09024ca0ba1e279fb9ed6c1b82d5b74b6a70c
7+
argcomplete==3.5.2 \
8+
--hash=sha256:036d020d79048a5d525bc63880d7a4b8d1668566b8a76daf1144c0bbe0f63472 \
9+
--hash=sha256:23146ed7ac4403b70bd6026402468942ceba34a6732255b9edf5b7354f68a6bb
1010
# via nox
11-
colorlog==6.8.2 \
12-
--hash=sha256:3e3e079a41feb5a1b64f978b5ea4f46040a94f11f0e8bbb8261e3dbbeca64d44 \
13-
--hash=sha256:4dcbb62368e2800cb3c5abd348da7e53f6c362dda502ec27c560b2e58a66bd33
11+
colorlog==6.9.0 \
12+
--hash=sha256:5906e71acd67cb07a71e779c47c4bcb45fb8c2993eebe9e5adcd6a6f1b283eff \
13+
--hash=sha256:bfba54a1b93b94f54e1f4fe48395725a3d92fd2a4af702f6bd70946bdc0c6ac2
1414
# via nox
15-
distlib==0.3.8 \
16-
--hash=sha256:034db59a0b96f8ca18035f36290806a9a6e6bd9d1ff91e45a7f172eb17e51784 \
17-
--hash=sha256:1530ea13e350031b6312d8580ddb6b27a104275a31106523b8f123787f494f64
15+
distlib==0.3.9 \
16+
--hash=sha256:47f8c22fd27c27e25a65601af709b38e4f0a45ea4fc2e710f65755fa8caaaf87 \
17+
--hash=sha256:a60f20dea646b8a33f3e7772f74dc0b2d0772d2837ee1342a00645c81edf9403
1818
# via virtualenv
19-
filelock==3.13.1 \
20-
--hash=sha256:521f5f56c50f8426f5e03ad3b281b490a87ef15bc6c526f168290f0c7148d44e \
21-
--hash=sha256:57dbda9b35157b05fb3e58ee91448612eb674172fab98ee235ccb0b5bee19a1c
19+
filelock==3.16.1 \
20+
--hash=sha256:2082e5703d51fbf98ea75855d9d5527e33d8ff23099bec374a134febee6946b0 \
21+
--hash=sha256:c249fbfcd5db47e5e2d6d62198e565475ee65e4831e2561c8e313fa7eb961435
2222
# via virtualenv
23-
nox==2024.3.2 \
24-
--hash=sha256:e53514173ac0b98dd47585096a55572fe504fecede58ced708979184d05440be \
25-
--hash=sha256:f521ae08a15adbf5e11f16cb34e8d0e6ea521e0b92868f684e91677deb974553
26-
# via -r requirements.in
27-
packaging==24.0 \
28-
--hash=sha256:2ddfb553fdf02fb784c234c7ba6ccc288296ceabec964ad2eae3777778130bc5 \
29-
--hash=sha256:eb82c5e3e56209074766e6885bb04b8c38a0c015d0a30036ebe7ece34c9989e9
23+
nox==2024.10.9 \
24+
--hash=sha256:1d36f309a0a2a853e9bccb76bbef6bb118ba92fa92674d15604ca99adeb29eab \
25+
--hash=sha256:7aa9dc8d1c27e9f45ab046ffd1c3b2c4f7c91755304769df231308849ebded95
26+
# via -r synthtool/gcp/templates/python_library/.kokoro/docker/docs/requirements.in
27+
packaging==24.2 \
28+
--hash=sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759 \
29+
--hash=sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f
3030
# via nox
31-
platformdirs==4.2.0 \
32-
--hash=sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068 \
33-
--hash=sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768
31+
platformdirs==4.3.6 \
32+
--hash=sha256:357fb2acbc885b0419afd3ce3ed34564c13c9b95c89360cd9563f73aa5e2b907 \
33+
--hash=sha256:73e575e1408ab8103900836b97580d5307456908a03e92031bab39e4554cc3fb
3434
# via virtualenv
35-
virtualenv==20.25.1 \
36-
--hash=sha256:961c026ac520bac5f69acb8ea063e8a4f071bcc9457b9c1f28f6b085c511583a \
37-
--hash=sha256:e08e13ecdca7a0bd53798f356d5831434afa5b07b93f0abdf0797b7a06ffe197
35+
tomli==2.2.1 \
36+
--hash=sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6 \
37+
--hash=sha256:02abe224de6ae62c19f090f68da4e27b10af2b93213d36cf44e6e1c5abd19fdd \
38+
--hash=sha256:286f0ca2ffeeb5b9bd4fcc8d6c330534323ec51b2f52da063b11c502da16f30c \
39+
--hash=sha256:2d0f2fdd22b02c6d81637a3c95f8cd77f995846af7414c5c4b8d0545afa1bc4b \
40+
--hash=sha256:33580bccab0338d00994d7f16f4c4ec25b776af3ffaac1ed74e0b3fc95e885a8 \
41+
--hash=sha256:400e720fe168c0f8521520190686ef8ef033fb19fc493da09779e592861b78c6 \
42+
--hash=sha256:40741994320b232529c802f8bc86da4e1aa9f413db394617b9a256ae0f9a7f77 \
43+
--hash=sha256:465af0e0875402f1d226519c9904f37254b3045fc5084697cefb9bdde1ff99ff \
44+
--hash=sha256:4a8f6e44de52d5e6c657c9fe83b562f5f4256d8ebbfe4ff922c495620a7f6cea \
45+
--hash=sha256:4e340144ad7ae1533cb897d406382b4b6fede8890a03738ff1683af800d54192 \
46+
--hash=sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249 \
47+
--hash=sha256:6972ca9c9cc9f0acaa56a8ca1ff51e7af152a9f87fb64623e31d5c83700080ee \
48+
--hash=sha256:7fc04e92e1d624a4a63c76474610238576942d6b8950a2d7f908a340494e67e4 \
49+
--hash=sha256:889f80ef92701b9dbb224e49ec87c645ce5df3fa2cc548664eb8a25e03127a98 \
50+
--hash=sha256:8d57ca8095a641b8237d5b079147646153d22552f1c637fd3ba7f4b0b29167a8 \
51+
--hash=sha256:8dd28b3e155b80f4d54beb40a441d366adcfe740969820caf156c019fb5c7ec4 \
52+
--hash=sha256:9316dc65bed1684c9a98ee68759ceaed29d229e985297003e494aa825ebb0281 \
53+
--hash=sha256:a198f10c4d1b1375d7687bc25294306e551bf1abfa4eace6650070a5c1ae2744 \
54+
--hash=sha256:a38aa0308e754b0e3c67e344754dff64999ff9b513e691d0e786265c93583c69 \
55+
--hash=sha256:a92ef1a44547e894e2a17d24e7557a5e85a9e1d0048b0b5e7541f76c5032cb13 \
56+
--hash=sha256:ac065718db92ca818f8d6141b5f66369833d4a80a9d74435a268c52bdfa73140 \
57+
--hash=sha256:b82ebccc8c8a36f2094e969560a1b836758481f3dc360ce9a3277c65f374285e \
58+
--hash=sha256:c954d2250168d28797dd4e3ac5cf812a406cd5a92674ee4c8f123c889786aa8e \
59+
--hash=sha256:cb55c73c5f4408779d0cf3eef9f762b9c9f147a77de7b258bef0a5628adc85cc \
60+
--hash=sha256:cd45e1dc79c835ce60f7404ec8119f2eb06d38b1deba146f07ced3bbc44505ff \
61+
--hash=sha256:d3f5614314d758649ab2ab3a62d4f2004c825922f9e370b29416484086b264ec \
62+
--hash=sha256:d920f33822747519673ee656a4b6ac33e382eca9d331c87770faa3eef562aeb2 \
63+
--hash=sha256:db2b95f9de79181805df90bedc5a5ab4c165e6ec3fe99f970d0e302f384ad222 \
64+
--hash=sha256:e59e304978767a54663af13c07b3d1af22ddee3bb2fb0618ca1593e4f593a106 \
65+
--hash=sha256:e85e99945e688e32d5a35c1ff38ed0b3f41f43fad8df0bdf79f72b2ba7bc5272 \
66+
--hash=sha256:ece47d672db52ac607a3d9599a9d48dcb2f2f735c6c2d1f34130085bb12b112a \
67+
--hash=sha256:f4039b9cbc3048b2416cc57ab3bda989a6fcf9b36cf8937f01a6e731b64f80d7
68+
# via nox
69+
virtualenv==20.28.0 \
70+
--hash=sha256:23eae1b4516ecd610481eda647f3a7c09aea295055337331bb4e6892ecce47b0 \
71+
--hash=sha256:2c9c3262bb8e7b87ea801d715fae4495e6032450c71d2309be9550e7364049aa
3872
# via nox

.kokoro/docs/common.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ env_vars: {
3030

3131
env_vars: {
3232
key: "V2_STAGING_BUCKET"
33-
# Push non-cloud library docs to `docs-staging-v2-staging` instead of the
33+
# Push non-cloud library docs to `docs-staging-v2-dev` instead of the
3434
# Cloud RAD bucket `docs-staging-v2`
35-
value: "docs-staging-v2-staging"
35+
value: "docs-staging-v2-dev"
3636
}
3737

3838
# It will upload the docker image after successful builds.
@@ -64,4 +64,4 @@ before_action {
6464
keyname: "docuploader_service_account"
6565
}
6666
}
67-
}
67+
}

.kokoro/populate-secrets.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Use of this source code is governed by a BSD-style
55
# license that can be found in the LICENSE file or at

.kokoro/publish-docs.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Use of this source code is governed by a BSD-style
55
# license that can be found in the LICENSE file or at
@@ -13,42 +13,42 @@ export PYTHONUNBUFFERED=1
1313
export PATH="${HOME}/.local/bin:${PATH}"
1414

1515
# Install nox
16-
python3 -m pip install --require-hashes -r .kokoro/requirements.txt
17-
python3 -m nox --version
16+
python3.10 -m pip install --require-hashes -r .kokoro/requirements.txt
17+
python3.10 -m nox --version
1818

1919
# build docs
2020
nox -s docs
2121

2222
# create metadata
23-
python3 -m docuploader create-metadata \
23+
python3.10 -m docuploader create-metadata \
2424
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
25-
--version=$(python3 setup.py --version) \
25+
--version=$(python3.10 setup.py --version) \
2626
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
27-
--distribution-name=$(python3 setup.py --name) \
27+
--distribution-name=$(python3.10 setup.py --name) \
2828
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
2929
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
3030
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
3131

3232
cat docs.metadata
3333

3434
# upload docs
35-
python3 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
35+
python3.10 -m docuploader upload docs/_build/html --metadata-file docs.metadata --staging-bucket "${STAGING_BUCKET}"
3636

3737

3838
# docfx yaml files
3939
nox -s docfx
4040

4141
# create metadata.
42-
python3 -m docuploader create-metadata \
42+
python3.10 -m docuploader create-metadata \
4343
--name=$(jq --raw-output '.name // empty' .repo-metadata.json) \
44-
--version=$(python3 setup.py --version) \
44+
--version=$(python3.10 setup.py --version) \
4545
--language=$(jq --raw-output '.language // empty' .repo-metadata.json) \
46-
--distribution-name=$(python3 setup.py --name) \
46+
--distribution-name=$(python3.10 setup.py --name) \
4747
--product-page=$(jq --raw-output '.product_documentation // empty' .repo-metadata.json) \
4848
--github-repository=$(jq --raw-output '.repo // empty' .repo-metadata.json) \
4949
--issue-tracker=$(jq --raw-output '.issue_tracker // empty' .repo-metadata.json)
5050

5151
cat docs.metadata
5252

5353
# upload docs
54-
python3 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"
54+
python3.10 -m docuploader upload docs/_build/html/docfx_yaml --metadata-file docs.metadata --destination-prefix docfx --staging-bucket "${V2_STAGING_BUCKET}"

.kokoro/trampoline.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Use of this source code is governed by a BSD-style
55
# license that can be found in the LICENSE file or at

.kokoro/trampoline_v2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# Copyright 2023 Google LLC
2+
# Copyright 2024 Google LLC
33
#
44
# Use of this source code is governed by a BSD-style
55
# license that can be found in the LICENSE file or at

.trampolinerc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2023 Google LLC
1+
# Copyright 2024 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.

0 commit comments

Comments
 (0)