patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Jerin Jacob <jerinjacobk@gmail.com>
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>
Subject: Re: [PATCH] doc: replace deprecated distutils version parsing
Date: Tue, 11 Jan 2022 18:41:44 +0530	[thread overview]
Message-ID: <CALBAE1PVk=HCh9jZUfkf-ou0AF3323hxomRg9-f2_YAasAVMTQ@mail.gmail.com> (raw)
In-Reply-To: <20220111114356.893127-1-thomas@monjalon.net>

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
>

  reply	other threads:[~2022-01-11 13:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-11 11:43 Thomas Monjalon
2022-01-11 13:11 ` Jerin Jacob [this message]
2022-01-11 13:33   ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CALBAE1PVk=HCh9jZUfkf-ou0AF3323hxomRg9-f2_YAasAVMTQ@mail.gmail.com' \
    --to=jerinjacobk@gmail.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=stable@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).