From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3DF8FA0350 for ; Tue, 11 Jan 2022 12:44:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 268C8426E8; Tue, 11 Jan 2022 12:44:10 +0100 (CET) Received: from wout1-smtp.messagingengine.com (wout1-smtp.messagingengine.com [64.147.123.24]) by mails.dpdk.org (Postfix) with ESMTP id B426D411AE; Tue, 11 Jan 2022 12:44:07 +0100 (CET) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 7B5CA320112B; Tue, 11 Jan 2022 06:44:06 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 11 Jan 2022 06:44:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm3; bh=5TzqIgCSEe8hfxA+YMedcREIr6 J/cPhlPQcqbamTiNQ=; b=OKACrQlAnoG4eC2I1y5QHriHRGKTec3B67NUccJsz7 mZ8SKzpeNLuy9hcjCEdKIMrqiqE5IgGjh8TqD4/wpAIZSbiYQzNbk3a0o9nz32fK EY9D6xsAOaLD4LTxkfaxOsY4XSTgJS4ZqLxl0rCMQoF/2WZF0nr4vm+NCiC+bo9E 0jgHzXm6oqBxTzq/rkauZ+UrhauXB9gx4K5xkVl6l6u6YtMg5CRskXCX7CPrAzJ6 TLi7Un59S7BmXBikcLpbKyCOU/EHeS00JSkWiU9HwoVV70UJQxlAC14bwGCHYlyX xjOlKsGxLKaJhCd7zz035JwQk9uvaIV5fUrXeyleddSQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=5TzqIgCSEe8hfxA+Y MedcREIr6J/cPhlPQcqbamTiNQ=; b=Ro/crUuBWgMDhCF65S3jCT35NCb1n33Xi /bzLOUA9QcGAzkKEBtoQx6/INnqjIXzHTb4Mkb5Z3AaSqzxsbq1lf0kIoooxKF5G ws3DuBQTDnCBPeqkGwSj/TgEd1hELkHzfZfVVUD9mZK2nMnRC5psH2OQFFm6hQrs S3bY4GHDQP25YJCHvAqJLysMxVRELbnIfNHGSwYXoKIhMSM4Iv0sLNsXFSZpDrqP gLM8qY6uhereE00dHlNMpC8pnSmhKe/Rir273PczU1eiYm7zQ7luEO3IW8uEK+k3 4iWlniqK6lV+Wrvf+QVZhs7eTjPMFijU6v7IifeAQvPQSgWuQ+ffg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrudehfedgfedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffoggfgsedtkeertdertddtnecuhfhrohhmpefvhhhomhgrshcu ofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecuggftrf grthhtvghrnhepvdelvdduhedvudduveeuvdevheegudelgeeigfejheduhedttdegudff jeeihffgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 11 Jan 2022 06:44:04 -0500 (EST) From: Thomas Monjalon To: dev@dpdk.org Cc: stable@dpdk.org, Jerin Jacob , Bruce Richardson Subject: [PATCH] doc: replace deprecated distutils version parsing Date: Tue, 11 Jan 2022 12:43:56 +0100 Message-Id: <20220111114356.893127-1-thomas@monjalon.net> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org 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 Cc: stable@dpdk.org Reported-by: Jerin Jacob Signed-off-by: Thomas Monjalon --- 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 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 @@ 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 1743ce301f..a55ce38800 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 @@ 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 = "" @@ -427,7 +427,7 @@ def setup(app): 'Features availability for Timer adapters', '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.34.1