patch 'doc: replace deprecated distutils version parsing' has been queued to stable release 21.11.1

Kevin Traynor ktraynor at redhat.com
Mon Feb 21 16:33:11 CET 2022


Hi,

FYI, your patch has been queued to stable release 21.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/26/22. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/b3122779a5d515380f174f6573be168e385ae95b

Thanks.

Kevin

---
>From b3122779a5d515380f174f6573be168e385ae95b Mon Sep 17 00:00:00 2001
From: Thomas Monjalon <thomas at monjalon.net>
Date: Tue, 11 Jan 2022 12:35:44 +0100
Subject: [PATCH] doc: replace deprecated distutils version parsing

[ upstream commit 2654ce5c56a4c17a649550ba89fd9003f21eab5b ]

When using Python 3.10, this warning appears:
  DeprecationWarning: The distutils package is deprecated
  and slated for removal in Python 3.12.
  Use setuptools or check PEP 632 for potential alternatives

The PEP 632 recommends replacing "distutils.version" with "packaging".

Bugzilla ID: 914

Reported-by: Jerin Jacob <jerinj at marvell.com>
Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Tested-by: Jerin Jacob <jerinj at marvell.com>
---
 buildtools/call-sphinx-build.py | 4 ++--
 doc/guides/conf.py              | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/buildtools/call-sphinx-build.py b/buildtools/call-sphinx-build.py
index 26b199220a..39a60d09fa 100755
--- a/buildtools/call-sphinx-build.py
+++ b/buildtools/call-sphinx-build.py
@@ -8,5 +8,5 @@ import os
 from os.path import join
 from subprocess import run, PIPE, STDOUT
-from distutils.version import StrictVersion
+from packaging.version import Version
 
 # assign parameters to variables
@@ -20,5 +20,5 @@ ver = run([sphinx, '--version'], stdout=PIPE,
           stderr=STDOUT).stdout.decode().split()[-1]
 sphinx_cmd = [sphinx] + extra_args
-if StrictVersion(ver) >= StrictVersion('1.7'):
+if Version(ver) >= Version('1.7'):
     sphinx_cmd += ['-j', 'auto']
 
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 1743ce301f..a55ce38800 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -4,5 +4,5 @@
 
 from docutils import nodes
-from distutils.version import LooseVersion
+from packaging.version import Version
 from sphinx import __version__ as sphinx_version
 from os import listdir
@@ -29,5 +29,5 @@ stop_on_error = ('-W' in argv)
 project = 'Data Plane Development Kit'
 html_logo = '../logo/DPDK_logo_vertical_rev_small.png'
-if LooseVersion(sphinx_version) >= LooseVersion('3.5'):
+if Version(sphinx_version) >= Version('3.5'):
     html_permalinks = False
 else:
@@ -428,5 +428,5 @@ def setup(app):
                             'Feature')
 
-    if LooseVersion(sphinx_version) < LooseVersion('1.3.1'):
+    if Version(sphinx_version) < Version('1.3.1'):
         print('Upgrade sphinx to version >= 1.3.1 for '
               'improved Figure/Table number handling.',
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-21 15:22:44.757694178 +0000
+++ 0002-doc-replace-deprecated-distutils-version-parsing.patch	2022-02-21 15:22:44.033703995 +0000
@@ -1 +1 @@
-From 2654ce5c56a4c17a649550ba89fd9003f21eab5b Mon Sep 17 00:00:00 2001
+From b3122779a5d515380f174f6573be168e385ae95b Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2654ce5c56a4c17a649550ba89fd9003f21eab5b ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org



More information about the stable mailing list