* [PATCH] docs/conf.py: Remove usage of distutils
@ 2024-03-04 9:36 Thomas Huth
2024-03-04 9:58 ` Daniel P. Berrangé
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Thomas Huth @ 2024-03-04 9:36 UTC (permalink / raw)
To: qemu-devel, Peter Maydell
Cc: qemu-stable, Daniel P . Berrangé, Thomas Huth
The macOS jobs in our CI recently started failing, complaining that
the distutils module is not available anymore. And indeed, according to
https://peps.python.org/pep-0632/ it's been deprecated since a while
and now likely got removed in recent Python versions.
Fortunately, we only use it for a version check via LooseVersion here
which we don't really need anymore: All distros ship newer versions of
Sphinx now (see https://repology.org/project/python:sphinx/versions -
the oldest one is 0.6.6 on CentOS 6!), so we can simply drop the version
check now.
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
docs/conf.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/docs/conf.py b/docs/conf.py
index e84a95e71c..1b2afa241c 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -29,7 +29,6 @@
import os
import sys
import sphinx
-from distutils.version import LooseVersion
from sphinx.errors import ConfigError
# The per-manual conf.py will set qemu_docdir for a single-manual build;
@@ -165,11 +164,10 @@
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
-if LooseVersion(sphinx_rtd_theme.__version__) >= LooseVersion("0.4.3"):
- html_theme_options = {
- "style_nav_header_background": "#802400",
- "navigation_with_keys": True,
- }
+html_theme_options = {
+ "style_nav_header_background": "#802400",
+ "navigation_with_keys": True,
+}
html_logo = os.path.join(qemu_docdir, "../ui/icons/qemu_128x128.png")
--
2.44.0
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] docs/conf.py: Remove usage of distutils
2024-03-04 9:36 [PATCH] docs/conf.py: Remove usage of distutils Thomas Huth
@ 2024-03-04 9:58 ` Daniel P. Berrangé
2024-03-04 10:56 ` Peter Maydell
2024-03-04 10:58 ` Michael Tokarev
2 siblings, 0 replies; 7+ messages in thread
From: Daniel P. Berrangé @ 2024-03-04 9:58 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, Peter Maydell, qemu-stable
On Mon, Mar 04, 2024 at 10:36:18AM +0100, Thomas Huth wrote:
> The macOS jobs in our CI recently started failing, complaining that
> the distutils module is not available anymore. And indeed, according to
> https://peps.python.org/pep-0632/ it's been deprecated since a while
> and now likely got removed in recent Python versions.
>
> Fortunately, we only use it for a version check via LooseVersion here
> which we don't really need anymore: All distros ship newer versions of
> Sphinx now (see https://repology.org/project/python:sphinx/versions -
> the oldest one is 0.6.6 on CentOS 6!), so we can simply drop the version
> check now.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> docs/conf.py | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs/conf.py: Remove usage of distutils
2024-03-04 9:36 [PATCH] docs/conf.py: Remove usage of distutils Thomas Huth
2024-03-04 9:58 ` Daniel P. Berrangé
@ 2024-03-04 10:56 ` Peter Maydell
2024-03-04 11:10 ` Thomas Huth
2024-03-04 10:58 ` Michael Tokarev
2 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2024-03-04 10:56 UTC (permalink / raw)
To: Thomas Huth; +Cc: qemu-devel, qemu-stable, Daniel P . Berrangé
On Mon, 4 Mar 2024 at 09:36, Thomas Huth <thuth@redhat.com> wrote:
>
> The macOS jobs in our CI recently started failing, complaining that
> the distutils module is not available anymore. And indeed, according to
> https://peps.python.org/pep-0632/ it's been deprecated since a while
> and now likely got removed in recent Python versions.
>
> Fortunately, we only use it for a version check via LooseVersion here
> which we don't really need anymore: All distros ship newer versions of
> Sphinx now (see https://repology.org/project/python:sphinx/versions -
> the oldest one is 0.6.6 on CentOS 6!), so we can simply drop the version
> check now.
This code isn't checking the Sphinx version (we do that via the
setting of needs_sphinx, current minimum 1.6), but the
sphinx-rtd-theme version, which is independent of Sphinx's
version numbering scheme.
I get timeouts trying to connect to repology.org, so can't check:
do distros all ship new enough versions of sphinx-rtd-theme yet?
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> docs/conf.py | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/docs/conf.py b/docs/conf.py
> index e84a95e71c..1b2afa241c 100644
> --- a/docs/conf.py
> +++ b/docs/conf.py
> @@ -29,7 +29,6 @@
> import os
> import sys
> import sphinx
> -from distutils.version import LooseVersion
> from sphinx.errors import ConfigError
>
> # The per-manual conf.py will set qemu_docdir for a single-manual build;
> @@ -165,11 +164,10 @@
> # Theme options are theme-specific and customize the look and feel of a theme
> # further. For a list of options available for each theme, see the
> # documentation.
> -if LooseVersion(sphinx_rtd_theme.__version__) >= LooseVersion("0.4.3"):
> - html_theme_options = {
> - "style_nav_header_background": "#802400",
> - "navigation_with_keys": True,
> - }
> +html_theme_options = {
> + "style_nav_header_background": "#802400",
> + "navigation_with_keys": True,
> +}
>
> html_logo = os.path.join(qemu_docdir, "../ui/icons/qemu_128x128.png")
thanks
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] docs/conf.py: Remove usage of distutils
2024-03-04 10:56 ` Peter Maydell
@ 2024-03-04 11:10 ` Thomas Huth
2024-03-04 11:18 ` Peter Maydell
0 siblings, 1 reply; 7+ messages in thread
From: Thomas Huth @ 2024-03-04 11:10 UTC (permalink / raw)
To: Peter Maydell, Paolo Bonzini, John Snow
Cc: qemu-devel, qemu-stable, Daniel P . Berrangé
On 04/03/2024 11.56, Peter Maydell wrote:
> On Mon, 4 Mar 2024 at 09:36, Thomas Huth <thuth@redhat.com> wrote:
>>
>> The macOS jobs in our CI recently started failing, complaining that
>> the distutils module is not available anymore. And indeed, according to
>> https://peps.python.org/pep-0632/ it's been deprecated since a while
>> and now likely got removed in recent Python versions.
>>
>> Fortunately, we only use it for a version check via LooseVersion here
>> which we don't really need anymore: All distros ship newer versions of
>> Sphinx now (see https://repology.org/project/python:sphinx/versions -
>> the oldest one is 0.6.6 on CentOS 6!), so we can simply drop the version
>> check now.
>
> This code isn't checking the Sphinx version (we do that via the
> setting of needs_sphinx, current minimum 1.6), but the
> sphinx-rtd-theme version, which is independent of Sphinx's
> version numbering scheme.
Oops, sorry for mixing that up!
> I get timeouts trying to connect to repology.org, so can't check:
> do distros all ship new enough versions of sphinx-rtd-theme yet?
Using my shell script to query repology, I get:
centos_stream_8: 0.3.1
centos_stream_9: 0.5.1
fedora_37: 1.0.0
fedora_38: 1.1.1
fedora_39: 1.2.2
fedora_rawhide: 2.0.0
freebsd: 1.0.0
haikuports_master: 1.2.1
openbsd: 1.2.2
opensuse_leap_15_5: 0.5.1
pkgsrc_current: 2.0.0
debian_11: 0.5.1
debian_12: 1.2.0
debian_13: 2.0.0
ubuntu_20_04: 0.4.3
ubuntu_22_04: 1.0.0
ubuntu_23_04: 1.2.0
ubuntu_23_10: 1.3.0
ubuntu_24_04: 2.0.0
So CentOS Stream 8 is too old ... but didn't we stop supporting the distro
Sphinx there anyway since we switched to the python venv stuff last year?
Thomas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs/conf.py: Remove usage of distutils
2024-03-04 11:10 ` Thomas Huth
@ 2024-03-04 11:18 ` Peter Maydell
2024-03-04 11:35 ` Thomas Huth
0 siblings, 1 reply; 7+ messages in thread
From: Peter Maydell @ 2024-03-04 11:18 UTC (permalink / raw)
To: Thomas Huth
Cc: Paolo Bonzini, John Snow, qemu-devel, qemu-stable,
Daniel P . Berrangé
On Mon, 4 Mar 2024 at 11:10, Thomas Huth <thuth@redhat.com> wrote:
> Using my shell script to query repology, I get:
>
> centos_stream_8: 0.3.1
> centos_stream_9: 0.5.1
> fedora_37: 1.0.0
> fedora_38: 1.1.1
> fedora_39: 1.2.2
> fedora_rawhide: 2.0.0
> freebsd: 1.0.0
> haikuports_master: 1.2.1
> openbsd: 1.2.2
> opensuse_leap_15_5: 0.5.1
> pkgsrc_current: 2.0.0
>
> debian_11: 0.5.1
> debian_12: 1.2.0
> debian_13: 2.0.0
> ubuntu_20_04: 0.4.3
> ubuntu_22_04: 1.0.0
> ubuntu_23_04: 1.2.0
> ubuntu_23_10: 1.3.0
> ubuntu_24_04: 2.0.0
>
> So CentOS Stream 8 is too old ... but didn't we stop supporting the distro
> Sphinx there anyway since we switched to the python venv stuff last year?
Not sure, but that does ring a faint bell.
As our other option, what's the approved Python way
of comparing versions these days?
-- PMM
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs/conf.py: Remove usage of distutils
2024-03-04 11:18 ` Peter Maydell
@ 2024-03-04 11:35 ` Thomas Huth
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Huth @ 2024-03-04 11:35 UTC (permalink / raw)
To: Peter Maydell
Cc: Paolo Bonzini, John Snow, qemu-devel, qemu-stable,
Daniel P . Berrangé
On 04/03/2024 12.18, Peter Maydell wrote:
> On Mon, 4 Mar 2024 at 11:10, Thomas Huth <thuth@redhat.com> wrote:
>> Using my shell script to query repology, I get:
>>
>> centos_stream_8: 0.3.1
>> centos_stream_9: 0.5.1
>> fedora_37: 1.0.0
>> fedora_38: 1.1.1
>> fedora_39: 1.2.2
>> fedora_rawhide: 2.0.0
>> freebsd: 1.0.0
>> haikuports_master: 1.2.1
>> openbsd: 1.2.2
>> opensuse_leap_15_5: 0.5.1
>> pkgsrc_current: 2.0.0
>>
>> debian_11: 0.5.1
>> debian_12: 1.2.0
>> debian_13: 2.0.0
>> ubuntu_20_04: 0.4.3
>> ubuntu_22_04: 1.0.0
>> ubuntu_23_04: 1.2.0
>> ubuntu_23_10: 1.3.0
>> ubuntu_24_04: 2.0.0
>>
>> So CentOS Stream 8 is too old ... but didn't we stop supporting the distro
>> Sphinx there anyway since we switched to the python venv stuff last year?
>
> Not sure, but that does ring a faint bell.
I'm pretty sure: I was still using RHEL 8 on my laptop 'til last year, and
the distro Sphinx stopped working at one point in time, since it was based
on the default python there which is python 3.6 - and we stopped supporting
that python version in upstream. So you have to use Sphinx from the venv on
RHEL 8 / CentOS 8, and that seems to enforce a newer version of
sphinx_rtd_theme if I get that right from docs/requirements.txt and
pythondeps.toml.
Thomas
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] docs/conf.py: Remove usage of distutils
2024-03-04 9:36 [PATCH] docs/conf.py: Remove usage of distutils Thomas Huth
2024-03-04 9:58 ` Daniel P. Berrangé
2024-03-04 10:56 ` Peter Maydell
@ 2024-03-04 10:58 ` Michael Tokarev
2 siblings, 0 replies; 7+ messages in thread
From: Michael Tokarev @ 2024-03-04 10:58 UTC (permalink / raw)
To: Thomas Huth, qemu-devel, Peter Maydell
Cc: qemu-stable, Daniel P . Berrangé
04.03.2024 12:36, Thomas Huth wrote:
> The macOS jobs in our CI recently started failing, complaining that
> the distutils module is not available anymore. And indeed, according to
> https://peps.python.org/pep-0632/ it's been deprecated since a while
> and now likely got removed in recent Python versions.
>
> Fortunately, we only use it for a version check via LooseVersion here
> which we don't really need anymore: All distros ship newer versions of
> Sphinx now (see https://repology.org/project/python:sphinx/versions -
> the oldest one is 0.6.6 on CentOS 6!), so we can simply drop the version
> check now.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Thanks!
/mjt
> ---
> docs/conf.py | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/docs/conf.py b/docs/conf.py
> index e84a95e71c..1b2afa241c 100644
> --- a/docs/conf.py
> +++ b/docs/conf.py
> @@ -29,7 +29,6 @@
> import os
> import sys
> import sphinx
> -from distutils.version import LooseVersion
> from sphinx.errors import ConfigError
>
> # The per-manual conf.py will set qemu_docdir for a single-manual build;
> @@ -165,11 +164,10 @@
> # Theme options are theme-specific and customize the look and feel of a theme
> # further. For a list of options available for each theme, see the
> # documentation.
> -if LooseVersion(sphinx_rtd_theme.__version__) >= LooseVersion("0.4.3"):
> - html_theme_options = {
> - "style_nav_header_background": "#802400",
> - "navigation_with_keys": True,
> - }
> +html_theme_options = {
> + "style_nav_header_background": "#802400",
> + "navigation_with_keys": True,
> +}
>
> html_logo = os.path.join(qemu_docdir, "../ui/icons/qemu_128x128.png")
>
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2024-03-04 11:36 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-04 9:36 [PATCH] docs/conf.py: Remove usage of distutils Thomas Huth
2024-03-04 9:58 ` Daniel P. Berrangé
2024-03-04 10:56 ` Peter Maydell
2024-03-04 11:10 ` Thomas Huth
2024-03-04 11:18 ` Peter Maydell
2024-03-04 11:35 ` Thomas Huth
2024-03-04 10:58 ` Michael Tokarev
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.