mbox series

[v9,00/11] adding support for python 3 only

Message ID 20200929102224.440322-1-kevin.laatz@intel.com (mailing list archive)
Headers
Series adding support for python 3 only |

Message

Kevin Laatz Sept. 29, 2020, 10:22 a.m. UTC
  This patch set converts all python scripts in the project to use
python3 only and removes all deprecation notices associated with these
changes. This is due to python2 being EOL in January 2020.

---
v6:
  - rebased, removing conflict with make removal patchset.
  - added changes to buildtools/map_to_win.py

v7:
  - typo in email Cc'ing David Marchand
  - added maintainers for buildtools patch

v8:
  - removed unrelated cleanup
  - replaced integer cast with integer division operator

v9:
  - include documentation updates

Kevin Laatz (4):
  app/test-cmdline: support python3 only
  app/test: support python3 only
  buildtools: support python3 only
  doc: support python3 only

Louise Kilheeney (7):
  usertools/dpdk-telemetry-client: support python3 only
  usertools/dpdk-devbind: support python3 only
  usertools/dpdk-pmdinfo: support python3 only
  usertools/cpu_layout: support python3 only
  devtools: support python3 only
  config/arm: support python3 only
  app/test-bbdev: support python3 only

 app/test-bbdev/test-bbdev.py             |  7 +------
 app/test-cmdline/cmdline_test.py         |  9 ++-------
 app/test-cmdline/cmdline_test_data.py    |  1 +
 app/test/autotest.py                     |  7 +------
 app/test/autotest_data.py                |  1 +
 app/test/autotest_runner.py              | 21 ++++++++-------------
 app/test/autotest_test_funcs.py          |  1 +
 buildtools/map_to_win.py                 |  3 +--
 config/arm/armv8_machine.py              |  2 +-
 devtools/update_version_map_abi.py       |  7 +------
 doc/guides/contributing/coding_style.rst |  2 +-
 doc/guides/linux_gsg/sys_reqs.rst        |  2 +-
 doc/guides/rel_notes/deprecation.rst     |  6 ------
 doc/guides/rel_notes/release_20_11.rst   |  2 ++
 usertools/cpu_layout.py                  | 13 ++-----------
 usertools/dpdk-devbind.py                | 22 ++++------------------
 usertools/dpdk-pmdinfo.py                |  7 +------
 usertools/dpdk-telemetry-client.py       | 18 +++---------------
 18 files changed, 32 insertions(+), 99 deletions(-)
  

Comments

David Marchand Sept. 29, 2020, 12:22 p.m. UTC | #1
Hello Kevin,

On Tue, Sep 29, 2020 at 12:27 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
>
> This patch set converts all python scripts in the project to use
> python3 only and removes all deprecation notices associated with these
> changes. This is due to python2 being EOL in January 2020.
>
> ---
> v6:
>   - rebased, removing conflict with make removal patchset.
>   - added changes to buildtools/map_to_win.py
>
> v7:
>   - typo in email Cc'ing David Marchand
>   - added maintainers for buildtools patch
>
> v8:
>   - removed unrelated cleanup
>   - replaced integer cast with integer division operator
>
> v9:
>   - include documentation updates
>
> Kevin Laatz (4):
>   app/test-cmdline: support python3 only
>   app/test: support python3 only
>   buildtools: support python3 only
>   doc: support python3 only
>
> Louise Kilheeney (7):
>   usertools/dpdk-telemetry-client: support python3 only
>   usertools/dpdk-devbind: support python3 only
>   usertools/dpdk-pmdinfo: support python3 only
>   usertools/cpu_layout: support python3 only
>   devtools: support python3 only
>   config/arm: support python3 only
>   app/test-bbdev: support python3 only

I can still see one issue in doc/guides/conf.py as you mentioned yesterday.
There is also a script that directly calls /usr/bin/python3, worth
fixing from my pov.

$ for file in $(find app/ buildtools/ config/ devtools/ doc/ drivers/
examples/ kernel/ lib/ license/ usertools/ -name "*.py"); do head -1
$file |grep -q env.*python3 || echo $file; done
doc/guides/conf.py
usertools/dpdk-telemetry.py
  
Stephen Hemminger Sept. 29, 2020, 2:40 p.m. UTC | #2
On Tue, 29 Sep 2020 11:22:13 +0100
Kevin Laatz <kevin.laatz@intel.com> wrote:

> This patch set converts all python scripts in the project to use
> python3 only and removes all deprecation notices associated with these
> changes. This is due to python2 being EOL in January 2020.
> 
> ---
> v6:
>   - rebased, removing conflict with make removal patchset.
>   - added changes to buildtools/map_to_win.py
> 
> v7:
>   - typo in email Cc'ing David Marchand
>   - added maintainers for buildtools patch
> 
> v8:
>   - removed unrelated cleanup
>   - replaced integer cast with integer division operator
> 
> v9:
>   - include documentation updates
> 
> Kevin Laatz (4):
>   app/test-cmdline: support python3 only
>   app/test: support python3 only
>   buildtools: support python3 only
>   doc: support python3 only
> 
> Louise Kilheeney (7):
>   usertools/dpdk-telemetry-client: support python3 only
>   usertools/dpdk-devbind: support python3 only
>   usertools/dpdk-pmdinfo: support python3 only
>   usertools/cpu_layout: support python3 only
>   devtools: support python3 only
>   config/arm: support python3 only
>   app/test-bbdev: support python3 only
> 
>  app/test-bbdev/test-bbdev.py             |  7 +------
>  app/test-cmdline/cmdline_test.py         |  9 ++-------
>  app/test-cmdline/cmdline_test_data.py    |  1 +
>  app/test/autotest.py                     |  7 +------
>  app/test/autotest_data.py                |  1 +
>  app/test/autotest_runner.py              | 21 ++++++++-------------
>  app/test/autotest_test_funcs.py          |  1 +
>  buildtools/map_to_win.py                 |  3 +--
>  config/arm/armv8_machine.py              |  2 +-
>  devtools/update_version_map_abi.py       |  7 +------
>  doc/guides/contributing/coding_style.rst |  2 +-
>  doc/guides/linux_gsg/sys_reqs.rst        |  2 +-
>  doc/guides/rel_notes/deprecation.rst     |  6 ------
>  doc/guides/rel_notes/release_20_11.rst   |  2 ++
>  usertools/cpu_layout.py                  | 13 ++-----------
>  usertools/dpdk-devbind.py                | 22 ++++------------------
>  usertools/dpdk-pmdinfo.py                |  7 +------
>  usertools/dpdk-telemetry-client.py       | 18 +++---------------
>  18 files changed, 32 insertions(+), 99 deletions(-)

Looks good Ack for whole series

Acked-by: Stephen Hemminger <stephen@networkplumber.org>
  
Kevin Laatz Sept. 29, 2020, 3:25 p.m. UTC | #3
On 29/09/2020 13:22, David Marchand wrote:
> Hello Kevin,
>
> On Tue, Sep 29, 2020 at 12:27 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
>> This patch set converts all python scripts in the project to use
>> python3 only and removes all deprecation notices associated with these
>> changes. This is due to python2 being EOL in January 2020.
>>
>> ---
>> v6:
>>    - rebased, removing conflict with make removal patchset.
>>    - added changes to buildtools/map_to_win.py
>>
>> v7:
>>    - typo in email Cc'ing David Marchand
>>    - added maintainers for buildtools patch
>>
>> v8:
>>    - removed unrelated cleanup
>>    - replaced integer cast with integer division operator
>>
>> v9:
>>    - include documentation updates
>>
>> Kevin Laatz (4):
>>    app/test-cmdline: support python3 only
>>    app/test: support python3 only
>>    buildtools: support python3 only
>>    doc: support python3 only
>>
>> Louise Kilheeney (7):
>>    usertools/dpdk-telemetry-client: support python3 only
>>    usertools/dpdk-devbind: support python3 only
>>    usertools/dpdk-pmdinfo: support python3 only
>>    usertools/cpu_layout: support python3 only
>>    devtools: support python3 only
>>    config/arm: support python3 only
>>    app/test-bbdev: support python3 only

Hi David,

> I can still see one issue in doc/guides/conf.py as you mentioned yesterday.
> There is also a script that directly calls /usr/bin/python3, worth
> fixing from my pov.
>
> $ for file in $(find app/ buildtools/ config/ devtools/ doc/ drivers/
> examples/ kernel/ lib/ license/ usertools/ -name "*.py"); do head -1
> $file |grep -q env.*python3 || echo $file; done
> doc/guides/conf.py
> usertools/dpdk-telemetry.py

doc/guides/conf.py is indirectly called from sphinx which potentially causes some compatibilty issues when we make conf.py only support python3 (if sphinx in using python2) - this is why I left this out of the patchset, otherwise the doc build will be broken :-(

I can change direct call to /usr/bin/python3.

-Kevin
  
Bruce Richardson Sept. 29, 2020, 3:48 p.m. UTC | #4
On Tue, Sep 29, 2020 at 04:25:40PM +0100, Kevin Laatz wrote:
> On 29/09/2020 13:22, David Marchand wrote:
> > Hello Kevin,
> > 
> > On Tue, Sep 29, 2020 at 12:27 PM Kevin Laatz <kevin.laatz@intel.com> wrote:
> > > This patch set converts all python scripts in the project to use
> > > python3 only and removes all deprecation notices associated with these
> > > changes. This is due to python2 being EOL in January 2020.
> > > 
> > > ---
> > > v6:
> > >    - rebased, removing conflict with make removal patchset.
> > >    - added changes to buildtools/map_to_win.py
> > > 
> > > v7:
> > >    - typo in email Cc'ing David Marchand
> > >    - added maintainers for buildtools patch
> > > 
> > > v8:
> > >    - removed unrelated cleanup
> > >    - replaced integer cast with integer division operator
> > > 
> > > v9:
> > >    - include documentation updates
> > > 
> > > Kevin Laatz (4):
> > >    app/test-cmdline: support python3 only
> > >    app/test: support python3 only
> > >    buildtools: support python3 only
> > >    doc: support python3 only
> > > 
> > > Louise Kilheeney (7):
> > >    usertools/dpdk-telemetry-client: support python3 only
> > >    usertools/dpdk-devbind: support python3 only
> > >    usertools/dpdk-pmdinfo: support python3 only
> > >    usertools/cpu_layout: support python3 only
> > >    devtools: support python3 only
> > >    config/arm: support python3 only
> > >    app/test-bbdev: support python3 only
> 
> Hi David,
> 
> > I can still see one issue in doc/guides/conf.py as you mentioned yesterday.
> > There is also a script that directly calls /usr/bin/python3, worth
> > fixing from my pov.
> > 
> > $ for file in $(find app/ buildtools/ config/ devtools/ doc/ drivers/
> > examples/ kernel/ lib/ license/ usertools/ -name "*.py"); do head -1
> > $file |grep -q env.*python3 || echo $file; done
> > doc/guides/conf.py
> > usertools/dpdk-telemetry.py
> 
> doc/guides/conf.py is indirectly called from sphinx which potentially causes some compatibilty issues when we make conf.py only support python3 (if sphinx in using python2) - this is why I left this out of the patchset, otherwise the doc build will be broken :-(
> 
> I can change direct call to /usr/bin/python3.
> 

I think we should err on the side of caution for the doc one - it can
always be changed by a later patch anyway. Cleaning up the dpdk-telemetry
one is probably worth doing though, I agree.

/Bruce
  
Robin Jarry Sept. 29, 2020, 3:54 p.m. UTC | #5
2020-09-29, Bruce Richardson:
> I think we should err on the side of caution for the doc one - it can
> always be changed by a later patch anyway. Cleaning up the
> dpdk-telemetry one is probably worth doing though, I agree.

I'm not sure I agree. Since python 2 support is officially dropped in
20.11. Why bother with preserving it only for the docs?
  
Bruce Richardson Sept. 29, 2020, 4:33 p.m. UTC | #6
On Tue, Sep 29, 2020 at 05:54:53PM +0200, Robin Jarry wrote:
> 2020-09-29, Bruce Richardson:
> > I think we should err on the side of caution for the doc one - it can
> > always be changed by a later patch anyway. Cleaning up the
> > dpdk-telemetry one is probably worth doing though, I agree.
> 
> I'm not sure I agree. Since python 2 support is officially dropped in
> 20.11. Why bother with preserving it only for the docs?
> 
Because we are not building the docs directly, sphinx is, and some systems
may still have a python2 version of sphinx installed. While I think it's ok
to say that to use DPDK you need to have python3 available, I don't like
telling users that their entire toolset needs to be updated to python3 too.
From what I can see, Centos/Redhat 7, which we still support, appears to
only have a python2 version of sphinx-build.

/Bruce