Determine this is the right repository
Summary of the issue
The docs CI check is failing during the Sphinx documentation build for google-auth (and potentially other packages that inherit from requests.Session). The build fails with an unexpected docutils warning which is treated as an error due to the strict -W flag. Here's the log:
/google/auth/transport/requests.py:docstring of requests.sessions.Session.get:5: WARNING: Field list ends without a blank line; unexpected unindent. [docutils]
...
build finished with problems, 1 warning (with warnings treated as errors).
nox > Command sphinx-build -T -W -N -b html -d docs/_build/doctrees/ docs/ docs/_build/html/ failed with exit code 1
nox > Session docs failed.
Root Cause
The requests library recently released version 2.34.0 (with subsequent patch updates up to 2.34.2 today) which introduced inline typings and docstring refactoring. The new docstring for requests.sessions.Session.get contains a reStructuredText formatting error (missing indentation on the second line of the :param params: description):
:param params: (optional) Dictionary, list of tuples or bytes to send
in the query string for the :class:`Request`. <-- Missing indentation here
google-auth defines AuthorizedSession which inherits from requests.Session. Sphinx's autodoc pulls in the inherited get docstring to document it, triggering the docutils warning.
Since the CI build uses -W (warnings as errors), this third-party formatting warning crashes the entire build.
Suggested Workaround / Fix
Until the issue is fixed upstream in the requests library, we can unblock the CI by pinning requests to a known stable version (e.g., 2.31.0) specifically for the docs session in noxfile.py:
@nox.session(python="3.10")
def docs(session):
"""Build the docs for this library."""
session.install("-e", ".[aiohttp]")
session.install("requests==2.31.0") # Pin to avoid upstream docstring formatting bug
session.install("sphinx", "alabaster", "recommonmark", "sphinx-docstring-typing")
...
Determine this is the right repository
Summary of the issue
The
docsCI check is failing during the Sphinx documentation build forgoogle-auth(and potentially other packages that inherit fromrequests.Session). The build fails with an unexpecteddocutilswarning which is treated as an error due to the strict-Wflag. Here's the log:Root Cause
The
requestslibrary recently released version2.34.0(with subsequent patch updates up to2.34.2today) which introduced inline typings and docstring refactoring. The new docstring forrequests.sessions.Session.getcontains a reStructuredText formatting error (missing indentation on the second line of the:param params:description):google-authdefinesAuthorizedSessionwhich inherits fromrequests.Session. Sphinx'sautodocpulls in the inheritedgetdocstring to document it, triggering thedocutilswarning.Since the CI build uses
-W(warnings as errors), this third-party formatting warning crashes the entire build.Suggested Workaround / Fix
Until the issue is fixed upstream in the
requestslibrary, we can unblock the CI by pinningrequeststo a known stable version (e.g.,2.31.0) specifically for thedocssession innoxfile.py: