[PATCH 1/4] python: update requirements for Sphinx

John Snow posted 4 patches 5 months, 1 week ago
Maintainers: John Snow <jsnow@redhat.com>, Peter Maydell <peter.maydell@linaro.org>, Cleber Rosa <crosa@redhat.com>
[PATCH 1/4] python: update requirements for Sphinx
Posted by John Snow 5 months, 1 week ago
In advance of actually bumping the build system requirements for Sphinx,
bump the version used for the static analysis tests. Update the minimum
requirements accordingly.

This changes the test environment without actually changing the build
requirements, and no extra changes are needed for the tests to continue
passing.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 python/setup.cfg         |  2 +-
 python/tests/minreqs.txt | 36 +++++++++++++++++++++---------------
 2 files changed, 22 insertions(+), 16 deletions(-)

diff --git a/python/setup.cfg b/python/setup.cfg
index d7f5dc7bafe..dc9615c1173 100644
--- a/python/setup.cfg
+++ b/python/setup.cfg
@@ -46,7 +46,7 @@ devel =
     urwid >= 2.1.2
     urwid-readline >= 0.13
     Pygments >= 2.9.0
-    sphinx >= 3.4.3
+    sphinx >= 6.2.1
 
 # Provides qom-fuse functionality
 fuse =
diff --git a/python/tests/minreqs.txt b/python/tests/minreqs.txt
index cd2e2a81c3d..fd7ec40929b 100644
--- a/python/tests/minreqs.txt
+++ b/python/tests/minreqs.txt
@@ -11,19 +11,19 @@
 # When adding new dependencies, pin the very oldest non-yanked version
 # on PyPI that allows the test suite to pass.
 
-# For some reason, the presence of packaging==14.0 below requires us to
+# For some reason, the presence of packaging==21.0 below requires us to
 # also pin setuptools to version 70 or below. Otherwise, the
 # installation of the QEMU package itself fails, failing to find
 # setuptools.
 setuptools<=70
 
 # Dependencies for qapidoc/qapi_domain et al
-sphinx==3.4.3
+sphinx==6.2.1
 
 # Dependencies for the TUI addon (Required for successful linting)
 urwid==2.1.2
 urwid-readline==0.13
-Pygments==2.9.0
+Pygments==2.13.0
 
 # Dependencies for mkvenv
 distlib==0.3.6
@@ -55,24 +55,30 @@ astroid==2.15.4
 dill==0.2
 lazy-object-proxy==1.4.0
 platformdirs==2.2.0
-toml==0.10.0
 tomlkit==0.10.1
 wrapt==1.14.0
 
 # Transitive sphinx dependencies
-Jinja2==2.7
-MarkupSafe==1.1.0
+Jinja2==3.0
+MarkupSafe==2.0.0
 alabaster==0.7.1
-babel==1.3
-docutils==0.12
-imagesize==0.5.0
-packaging==14.0
-pytz==2011b0
-requests==2.5.0
-snowballstemmer==1.1
+babel==2.9
+certifi==2017.4.17
+chardet==3.0.2
+docutils==0.18.1
+idna==2.5
+imagesize==1.3
+importlib-metadata==4.8.1
+packaging==21.0
+pyparsing==2.0.2
+pytz==2015.7
+requests==2.25.0
+snowballstemmer==2.0
 sphinxcontrib-applehelp==1.0.0
 sphinxcontrib-devhelp==1.0.0
-sphinxcontrib-htmlhelp==1.0.0
+sphinxcontrib-htmlhelp==2.0.0
 sphinxcontrib-jsmath==1.0.0
 sphinxcontrib-qthelp==1.0.0
-sphinxcontrib-serializinghtml==1.0.0
+sphinxcontrib-serializinghtml==1.1.5
+urllib3==1.21.1
+zipp==0.5
-- 
2.48.1
Re: [PATCH 1/4] python: update requirements for Sphinx
Posted by Akihiko Odaki 5 months, 1 week ago
On 2025/06/07 5:50, John Snow wrote:
> In advance of actually bumping the build system requirements for Sphinx,
> bump the version used for the static analysis tests. Update the minimum
> requirements accordingly.
> 
> This changes the test environment without actually changing the build
> requirements, and no extra changes are needed for the tests to continue
> passing.
> 
> Signed-off-by: John Snow <jsnow@redhat.com>

Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>

I didn't notice these files. Perhaps they are better to be documented 
with pythondeps.toml.

Regards,
Akihiko Odaki
Re: [PATCH 1/4] python: update requirements for Sphinx
Posted by John Snow 5 months, 1 week ago
On Sun, Jun 8, 2025 at 1:26 AM Akihiko Odaki <akihiko.odaki@daynix.com>
wrote:

> On 2025/06/07 5:50, John Snow wrote:
> > In advance of actually bumping the build system requirements for Sphinx,
> > bump the version used for the static analysis tests. Update the minimum
> > requirements accordingly.
> >
> > This changes the test environment without actually changing the build
> > requirements, and no extra changes are needed for the tests to continue
> > passing.
> >
> > Signed-off-by: John Snow <jsnow@redhat.com>
>
> Reviewed-by: Akihiko Odaki <odaki@rsg.ci.i.u-tokyo.ac.jp>
>
> I didn't notice these files. Perhaps they are better to be documented
> with pythondeps.toml.
>

You didn't miss them, they were added after you submitted your patch :)

The python tests checking anything to do with sphinx are very recent. The
relationship between pythondeps.toml and python/setup.cfg and
python/tests/minreqs.txt is still tenuous, but I'll keep in mind that we
may need to better document the relationships.

(Sphinx and its dependencies are installed only for the sake of pylint and
mypy to check docs/sphinx/qapidoc.py and docs/sphinx/qapi_domain.py, as
those packages need to be present in order for the static type analysis to
work fully. We don't actually *run* Sphinx from those tests, we just use
them as "headers", effectively.)

Thanks again,
--js


>
> Regards,
> Akihiko Odaki
>
>