tags 1135507 +patch thanks Hi,
The attached patch fixes the FTBFS by using the appropriate class for an external reference, and double backticks for code examples and python basic types, as used in the same documentation. Please forward the patch upstream.
>From 436562c45334acc9e83d2f4c9b5dda5b4eedc156 Mon Sep 17 00:00:00 2001 From: Teemu Hukkanen <[email protected]> Date: Fri, 22 May 2026 14:55:19 +0300 Subject: [PATCH] Fix missing sphinx default role Use appropriate :class:`twisted.web.resource.IResource` instead of `IResource`. Use double backticks to mark allow_redirects=False as a code example. Use double backticks for basic python types, as used elsewhere in the same documentation. --- docs/howto.rst | 6 +++--- docs/testing.rst | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/howto.rst b/docs/howto.rst index 32da368..bef3a60 100644 --- a/docs/howto.rst +++ b/docs/howto.rst @@ -51,7 +51,7 @@ The ``params`` argument may be either a ``dict`` or a ``list`` of ``(key, value)`` tuples. If it is a ``dict`` then the values in the dict may either be scalar values or a ``list`` or ``tuple`` thereof. -Scalar values means `str`, `bytes`, or anything else — even ``None`` — which will be coerced to `str`. +Scalar values means ``str``, ``bytes``, or anything else — even ``None`` — which will be coerced to ``str``. Strings are UTF-8 encoded. .. literalinclude:: examples/query_params.py @@ -104,7 +104,7 @@ The following will print a 200 OK response. Full example: :download:`redirects.py <examples/redirects.py>` -You can easily disable redirects by simply passing `allow_redirects=False` to +You can easily disable redirects by simply passing ``allow_redirects=False`` to any of the request methods. .. literalinclude:: examples/disable_redirects.py @@ -126,7 +126,7 @@ Full example: :download:`response_history.py <examples/response_history.py>` Cookies ------- -Cookies can be set by passing a `dict` or :py:class:`http.cookiejar.CookieJar` instance via the *cookies* keyword argument. +Cookies can be set by passing a ``dict`` or :py:class:`http.cookiejar.CookieJar` instance via the *cookies* keyword argument. Any cookies set by the server can be retrieved using the :py:meth:`~treq.response._Response.cookies()` response method, which returns a :py:class:`~http.cookiejar.CookieJar`. Use :py:func:`treq.cookies.search()` to extract cookies from the jar: diff --git a/docs/testing.rst b/docs/testing.rst index 855bc69..f724d33 100644 --- a/docs/testing.rst +++ b/docs/testing.rst @@ -9,7 +9,7 @@ Writing tests for HTTP clients The :class:`~treq.testing.StubTreq` class implements the :mod:`treq` module interface (:func:`treq.get()`, :func:`treq.post()`, etc.) but runs all I/O via a :class:`~twisted.internet.testing.MemoryReactor`. It wraps a :class:`twisted.web.resource.IResource` provider which handles each request. -You can wrap a pre-existing `IResource` provider, or write your own. +You can wrap a pre-existing :class:`twisted.web.resource.IResource` provider, or write your own. For example, the :class:`twisted.web.resource.ErrorPage` resource can produce an arbitrary HTTP status code. :class:`twisted.web.static.File` can serve files or directories. And you can easily achieve custom responses by writing trivial resources yourself: -- 2.53.0

