@@ -125,13 +125,26 @@ def docs(session):
125125 """Build the docs for this library."""
126126
127127 session .install ("-e" , ".[aiohttp]" )
128- session .install ("sphinx" , "alabaster" , "recommonmark" , "sphinx-docstring-typing" )
128+ session .install (
129+ # We need to pin to specific versions of the `sphinxcontrib-*` packages
130+ # which still support sphinx 4.x.
131+ # See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
132+ # and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
133+ "sphinxcontrib-applehelp==1.0.4" ,
134+ "sphinxcontrib-devhelp==1.0.2" ,
135+ "sphinxcontrib-htmlhelp==2.0.1" ,
136+ "sphinxcontrib-qthelp==1.0.3" ,
137+ "sphinxcontrib-serializinghtml==1.1.5" ,
138+ "sphinx==4.5.0" ,
139+ "alabaster" ,
140+ "recommonmark" ,
141+ )
129142
130143 shutil .rmtree (os .path .join ("docs" , "_build" ), ignore_errors = True )
131144 session .run (
132145 "sphinx-build" ,
133- "-T" , # show full traceback on exception
134146 "-W" , # warnings as errors
147+ "-T" , # show full traceback on exception
135148 "-N" , # no colors
136149 "-b" ,
137150 "html" ,
@@ -141,6 +154,26 @@ def docs(session):
141154 os .path .join ("docs" , "_build" , "html" , "" ),
142155 )
143156
157+ @nox .session (python = "3.10" )
158+ def docfx (session ):
159+ """Build the docfx yaml files for this library."""
160+
161+ session .install ("-e" , "." )
162+ session .install (
163+ # We need to pin to specific versions of the `sphinxcontrib-*` packages
164+ # which still support sphinx 4.x.
165+ # See https://github.com/googleapis/sphinx-docfx-yaml/issues/344
166+ # and https://github.com/googleapis/sphinx-docfx-yaml/issues/345.
167+ "sphinxcontrib-applehelp==1.0.4" ,
168+ "sphinxcontrib-devhelp==1.0.2" ,
169+ "sphinxcontrib-htmlhelp==2.0.1" ,
170+ "sphinxcontrib-qthelp==1.0.3" ,
171+ "sphinxcontrib-serializinghtml==1.1.5" ,
172+ "gcp-sphinx-docfx-yaml" ,
173+ "alabaster" ,
174+ "recommonmark" ,
175+ )
176+
144177
145178@nox .session (python = "pypy" )
146179def pypy (session ):
0 commit comments