The error «(SEVERE/4) Unexpected section title.» is about the Parameters and Returns headings that are inserted into the API docs (running sphinx with `-v -v -v` revealed that).

There is on-the-fly manipulation of the docstrings in jupyter_client/client.py::reqrep - I was able to get the docs to build by changing the inserted Parameters and Returns into paragraphs rather than headings. I've attached a patch that does this. I don't think it's quite the right change to be making, but it might help someone else understand the problem and find a better solution.

I can't begin to fathom why this is failure is Python 3.13 specific; the last time this package built on the buildd was with sphinx 7.4, so this might actually be a change between sphinx 7.4 and 8.1 (although I didn't spot anything in the changelog), rather than Python 3.12 and 3.13.

Incidentally, the warning that the intersphinx mapping not being found can be fixed by removing the «file://» from the mapping that is defined in debian/patches/docs-local-intersphinx.diff; an updated patch for that one is attached too.

Stuart

--
Stuart Prescott   http://www.nanonanonano.net/ stu...@nanonanonano.net
Debian Developer  http://www.debian.org/       stu...@debian.org
GPG fingerprint   90E2 D2C1 AD14 6A1B 7EBB 891D BBC1 7EBB 1396 F2F7
From: Julian Gilbey <j...@debian.org>
Date: Mon, 13 Jan 2025 12:42:34 +1100
Subject: Use local ipython documentation for intersphinx

Forwarded: not-needed
Last-Update: 2024-07-29
---
 docs/conf.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/conf.py b/docs/conf.py
index 7ebc807..e2d6b85 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -326,7 +326,7 @@ texinfo_documents = [
 
 
 # Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {"ipython": ("https://ipython.readthedocs.io/en/stable/";, None)}
+intersphinx_mapping = {"ipython": ("/usr/share/doc/python-ipython-doc/html/", None)}
 
 
 def setup(app: object) -> None:
From: Stuart Prescott <stu...@debian.org>
Date: Mon, 13 Jan 2025 12:43:57 +1100
Subject: Remove headings from docstrings

---
 jupyter_client/client.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/jupyter_client/client.py b/jupyter_client/client.py
index 851a234..5eb6c98 100644
--- a/jupyter_client/client.py
+++ b/jupyter_client/client.py
@@ -47,8 +47,8 @@ def reqrep(wrapped: t.Callable, meth: t.Callable, channel: str = "shell") -> t.C
     if "Parameters" not in basedoc:
         parts.append(
             """
-        Parameters
-        ----------
+        **Parameters**
+
         """
         )
     parts.append(
@@ -58,8 +58,8 @@ def reqrep(wrapped: t.Callable, meth: t.Callable, channel: str = "shell") -> t.C
         timeout: float or None (default: None)
             Timeout to use when waiting for a reply
 
-        Returns
-        -------
+        **Returns**
+
         msg_id: str
             The msg_id of the request sent, if reply=False (default)
         reply: dict

Reply via email to