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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Feb 18 13:37:31 CET 2022


Hi,

FYI, your patch has been queued to stable release 20.11.5

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/20/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/269489433cd49b15aeaba475c9f836c04dd6084f

Thanks.

Luca Boccassi

---
>From 269489433cd49b15aeaba475c9f836c04dd6084f 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
@@ -7,7 +7,7 @@ import sys
 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
 (sphinx, version, src, dst, *extra_args) = sys.argv[1:]
@@ -19,7 +19,7 @@ os.environ['DPDK_VERSION'] = version
 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']
 
 # find all the files sphinx will process so we can write them as dependencies
diff --git a/doc/guides/conf.py b/doc/guides/conf.py
index 894d81ca75..8379c53d7c 100644
--- a/doc/guides/conf.py
+++ b/doc/guides/conf.py
@@ -3,7 +3,7 @@
 # Copyright(c) 2010-2015 Intel Corporation
 
 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
 from os import environ
@@ -28,7 +28,7 @@ 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:
     html_add_permalinks = ""
@@ -385,7 +385,7 @@ def setup(app):
                             'Features availability in bbdev drivers',
                             '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.',
               file=stderr)
-- 
2.30.2

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2022-02-18 12:37:38.331715563 +0000
+++ 0002-doc-replace-deprecated-distutils-version-parsing.patch	2022-02-18 12:37:37.498787632 +0000
@@ -1 +1 @@
-From 2654ce5c56a4c17a649550ba89fd9003f21eab5b Mon Sep 17 00:00:00 2001
+From 269489433cd49b15aeaba475c9f836c04dd6084f Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 2654ce5c56a4c17a649550ba89fd9003f21eab5b ]
+
@@ -14 +15,0 @@
-Cc: stable at dpdk.org
@@ -47 +48 @@
-index 1743ce301f..a55ce38800 100644
+index 894d81ca75..8379c53d7c 100644
@@ -68,2 +69,2 @@
-@@ -427,7 +427,7 @@ def setup(app):
-                             'Features availability for Timer adapters',
+@@ -385,7 +385,7 @@ def setup(app):
+                             'Features availability in bbdev drivers',


More information about the stable mailing list