From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 1E26DA034F;
	Tue, 11 Jan 2022 14:12:12 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 5669B411AE;
	Tue, 11 Jan 2022 14:12:12 +0100 (CET)
Received: from mail-il1-f180.google.com (mail-il1-f180.google.com
 [209.85.166.180])
 by mails.dpdk.org (Postfix) with ESMTP id 2230C41143;
 Tue, 11 Jan 2022 14:12:11 +0100 (CET)
Received: by mail-il1-f180.google.com with SMTP id y18so5192740iln.3;
 Tue, 11 Jan 2022 05:12:11 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=mime-version:references:in-reply-to:from:date:message-id:subject:to
 :cc; bh=XaH/MqqM/rbsbXBbcEFZQLq0Hf2bYN0wq5ZBZQgJPkI=;
 b=phxc53vHgHFOw6udTSr9hCw0+t+8WH1I9GzViOVlEY85w0F6ytTNB2uWUGrtaN67VM
 T644GpGjy/lBza4VKWm8W7OBRfm9ZLgdHUP1UWYjMs0/8KNBqKrRL86xzrZmGCh3+Iry
 1vlQJGeVFXjLoI81lII9U5SVeTxD38V+AvYCUpiXZuXDiFy5WLS7i7jvRAUmlq/bVhqc
 Et1pCNdXF+cYmePQv+L9v8CNdDWBqC7HwCWcL+P7my7dvZrdahgY1l8Z4gEfFqaFXIBs
 kY/BdaD7sX5Wf/N6a6146tfgTm7Ed/BkmoD0HNeseMKlzT7ZI7XGWDE07DcDYYGwsTKA
 ZZ6w==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:mime-version:references:in-reply-to:from:date
 :message-id:subject:to:cc;
 bh=XaH/MqqM/rbsbXBbcEFZQLq0Hf2bYN0wq5ZBZQgJPkI=;
 b=VH316aSZBEI1rIyjnqvv08CTQYRMErk+cWNhE84743jiAuDLkCLUAqTpG6pMWAU8lO
 dsuyIulrOjafcxiCvv8zG1iJQi3VrO5x0gNyvwrytcGqT03P2Ptn7/XavlnxXtqNeM9u
 YeytJ7IKsdv9Y29ZnvUJBJIGlcOYCAApOOdf4fNF15TVCjgeK80ClM4wZtiPu3V62+mP
 3r6YvmLCcHPELxP9Qbi/5vZJzRWlMUz5cuHi6l27XNKA6cxcNv3cayFS5yNsyAymsY79
 fFOJ4lqiyPOcgKXgUsWEYBNnDdVIyL49G17+AWpqvMuUsNcBeKbuLr3+9VHN9PHXNCYB
 z/IQ==
X-Gm-Message-State: AOAM5323ZQyJFklxr/wTqOLYdOXWKgKss/DQ5/ah7fysMeLZ6Ycg/7AW
 wzKXqtE4v343Q386hL9ReY+/ZAojuPTQp3GBQcI=
X-Google-Smtp-Source: ABdhPJx3iJv0YCRww7XtThDJBKe0seH9vmVCBvBuRpFVamnZLUPor31w5O63m6nNJB7UsLkB5cCuPPB0HYBYNMmjCoY=
X-Received: by 2002:a05:6e02:1a2c:: with SMTP id
 g12mr2400848ile.192.1641906730321; 
 Tue, 11 Jan 2022 05:12:10 -0800 (PST)
MIME-Version: 1.0
References: <20220111114356.893127-1-thomas@monjalon.net>
In-Reply-To: <20220111114356.893127-1-thomas@monjalon.net>
From: Jerin Jacob <jerinjacobk@gmail.com>
Date: Tue, 11 Jan 2022 18:41:44 +0530
Message-ID: <CALBAE1PVk=HCh9jZUfkf-ou0AF3323hxomRg9-f2_YAasAVMTQ@mail.gmail.com>
Subject: Re: [PATCH] doc: replace deprecated distutils version parsing
To: Thomas Monjalon <thomas@monjalon.net>
Cc: dpdk-dev <dev@dpdk.org>, dpdk stable <stable@dpdk.org>,
 Jerin Jacob <jerinj@marvell.com>, 
 Bruce Richardson <bruce.richardson@intel.com>
Content-Type: text/plain; charset="UTF-8"
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Tue, Jan 11, 2022 at 5:14 PM Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 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 <jerinj@marvell.com>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>

Tested-by: Jerin Jacob <jerinj@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 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
>