Skip to content

Commit ebc2635

Browse files
build(python): fix docs and docfx builds (#581)
* build(python): fix `docs` and `docfx` builds Source-Link: googleapis/synthtool@fac8444 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:5ea6d0ab82c956b50962f91d94e206d3921537ae5fe1549ec5326381d8905cfa * See python/typeshed#11254 * See googleapis/synthtool#1916 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 17ff5f1 commit ebc2635

File tree

3 files changed

+37
-9
lines changed

3 files changed

+37
-9
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 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.
@@ -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:230f7fe8a0d2ed81a519cfc15c6bb11c5b46b9fb449b8b1219b3771bcb520ad2
17-
# created: 2023-12-09T15:16:25.430769578Z
16+
digest: sha256:5ea6d0ab82c956b50962f91d94e206d3921537ae5fe1549ec5326381d8905cfa
17+
# created: 2024-01-15T16:32:08.142785673Z

.kokoro/requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ jeepney==0.8.0 \
263263
# via
264264
# keyring
265265
# secretstorage
266-
jinja2==3.1.2 \
267-
--hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \
268-
--hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61
266+
jinja2==3.1.3 \
267+
--hash=sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa \
268+
--hash=sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90
269269
# via gcp-releasetool
270270
keyring==24.2.0 \
271271
--hash=sha256:4901caaf597bfd3bbd78c9a0c7c4c29fcd8310dab2cffefe749e916b6527acd6 \

noxfile.py

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,12 @@ def pytype(session):
188188
def mypy(session):
189189
"""Run type-checking."""
190190
session.install(".[grpc]", "mypy")
191+
# Exclude types-protobuf==4.24.0.20240106
192+
# See https://github.com/python/typeshed/issues/11254
191193
session.install(
192194
"types-setuptools",
193195
"types-requests",
194-
"types-protobuf",
196+
"types-protobuf!=4.24.0.20240106",
195197
"types-mock",
196198
"types-dataclasses",
197199
)
@@ -215,7 +217,20 @@ def docs(session):
215217
"""Build the docs for this library."""
216218

217219
session.install("-e", ".[grpc]")
218-
session.install("sphinx==4.2.0", "alabaster", "recommonmark")
220+
session.install(
221+
# We need to pin to specific versions of the `sphinxcontrib-*` packages
222+
# which still support sphinx 4.x.
223+
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
224+
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
225+
"sphinxcontrib-applehelp==1.0.4",
226+
"sphinxcontrib-devhelp==1.0.2",
227+
"sphinxcontrib-htmlhelp==2.0.1",
228+
"sphinxcontrib-qthelp==1.0.3",
229+
"sphinxcontrib-serializinghtml==1.1.5",
230+
"sphinx==4.5.0",
231+
"alabaster",
232+
"recommonmark",
233+
)
219234

220235
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
221236
session.run(
@@ -237,7 +252,20 @@ def docfx(session):
237252
"""Build the docfx yaml files for this library."""
238253

239254
session.install("-e", ".")
240-
session.install("alabaster", "recommonmark", "gcp-sphinx-docfx-yaml")
255+
session.install(
256+
# We need to pin to specific versions of the `sphinxcontrib-*` packages
257+
# which still support sphinx 4.x.
258+
# See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
259+
# and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
260+
"sphinxcontrib-applehelp==1.0.4",
261+
"sphinxcontrib-devhelp==1.0.2",
262+
"sphinxcontrib-htmlhelp==2.0.1",
263+
"sphinxcontrib-qthelp==1.0.3",
264+
"sphinxcontrib-serializinghtml==1.1.5",
265+
"gcp-sphinx-docfx-yaml",
266+
"alabaster",
267+
"recommonmark",
268+
)
241269

242270
shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True)
243271
session.run(

0 commit comments

Comments
 (0)