[dpdk-dev] [PATCH v10 11/11] doc: support python3 only
David Marchand
david.marchand at redhat.com
Fri Oct 2 13:01:13 CEST 2020
On Wed, Sep 30, 2020 at 1:45 PM Kevin Laatz <kevin.laatz at intel.com> wrote:
> diff --git a/doc/guides/conf.py b/doc/guides/conf.py
> index 9ebc26ed3f..ef550f68c0 100644
> --- a/doc/guides/conf.py
> +++ b/doc/guides/conf.py
> @@ -1,7 +1,7 @@
> +#!/usr/bin/env python3
> # SPDX-License-Identifier: BSD-3-Clause
> # Copyright(c) 2010-2015 Intel Corporation
>
> -from __future__ import print_function
> from docutils import nodes
> from distutils.version import LooseVersion
> from sphinx import __version__ as sphinx_version
> @@ -13,12 +13,7 @@
> from os.path import dirname
> from os.path import join as path_join
>
> -try:
> - # Python 2.
> - import ConfigParser as configparser
> -except:
> - # Python 3.
> - import configparser
> +import configparser
I am ok with dropping this part: the doc generation with python 2 / an
old sphinx is already broken since 20.02 with meson.
I can give details for people interested.
>
> try:
> import sphinx_rtd_theme
> diff --git a/doc/guides/contributing/coding_style.rst b/doc/guides/contributing/coding_style.rst
> index 0be9546a6a..4fc010ca49 100644
> --- a/doc/guides/contributing/coding_style.rst
> +++ b/doc/guides/contributing/coding_style.rst
> @@ -765,7 +765,7 @@ specializations, run the ``app/test`` binary, and use the ``dump_log_types``
> Python Code
> -----------
>
> -All Python code should work with Python 2.7+ and 3.2+ and be compliant with
> +All Python code should work with 3.2+ and be compliant with
> `PEP8 (Style Guide for Python Code) <https://www.python.org/dev/peps/pep-0008/>`_.
I am for dropping any mention of a version here.
On current HEAD of the main branch, the requirements already ask for a
3.5 version.
I would simply ask for PEP8 compliance in this doc.
Opinion?
>
> The ``pep8`` tool can be used for testing compliance with the guidelines.
> diff --git a/doc/guides/linux_gsg/sys_reqs.rst b/doc/guides/linux_gsg/sys_reqs.rst
> index 6b9f573fce..66d9723dd6 100644
> --- a/doc/guides/linux_gsg/sys_reqs.rst
> +++ b/doc/guides/linux_gsg/sys_reqs.rst
> @@ -47,7 +47,7 @@ Compilation of the DPDK
>
> * Python v3.5+ is needed to build DPDK using meson and ninja
>
> - * Python 2.7+ or 3.2+, to use various helper scripts included in the DPDK package.
> + * Python 3.2+, to use various helper scripts included in the DPDK package.
Dropped this hunk, as it has already been updated with the "make
removal" series.
--
David Marchand
More information about the dev
mailing list