@@ -188,10 +188,12 @@ def pytype(session):
188188def 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