Dropping python 2 support
Hi all,
As you may have noticed, Python 2 is officially end-of-life since January 1st 2020.
https://www.python.org/doc/sunset-python-2/
Some projects have already decided to drop python 2 support:
https://github.com/openvswitch/ovs/commit/1ca0323e7c29
https://wiki.debian.org/Python/2Removal
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html
I figure this may be the opportunity to do the same in DPDK. Does anyone have arguments against this? If not, I am willing to work on the matter.
Signature · 1 line
Robin
Quoted 7 lines · Robin Jarry
Hi all,
As you may have noticed, Python 2 is officially end-of-life since January 1st 2020.
Quoted 9 lines
Some projects have already decided to drop python 2 support:
https://github.com/openvswitch/ovs/commit/1ca0323e7c29
https://wiki.debian.org/Python/2Removal
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.htmlI figure this may be the opportunity to do the same in DPDK. Does anyone have arguments against this? If not, I am willing to work on the matter.
I'm in favour of dropping the support in general, however, do we still not need to support some distro's e.g. Redhat/CentOS 7, which do not have python3?
/Bruce
2020-02-12, Bruce Richardson:
Quoted 3 lines
I'm in favour of dropping the support in general, however, do we still not need to support some distro's e.g. Redhat/CentOS 7, which do not have python3?
Since the 7.7 release, python3 is now officially available in the official repos:
https://access.redhat.com/solutions/2353081
Quoted 6 lines
August 8 2019 at 5:40 PM
As of RHEL 7.7, python3 is included into base RHEL 7 channels without the need for software collections. Note: this does not replace the need for having python2 as the system default python for OS utilities on RHEL 7.
Moreover, I figure that Redhat/CentOS 7 will be using an LTS version, not the latest master snapshot.
Signature · 1 line
Robin
Quoted 9 lines · Robin Jarry
2020-02-12, Bruce Richardson:
Quoted 3 lines
I'm in favour of dropping the support in general, however, do we still not need to support some distro's e.g. Redhat/CentOS 7, which do not have python3?
Since the 7.7 release, python3 is now officially available in the official repos:
Yes, that's right.
Quoted 10 lines
Quoted 6 lines
August 8 2019 at 5:40 PM
As of RHEL 7.7, python3 is included into base RHEL 7 channels without the need for software collections. Note: this does not replace the need for having python2 as the system default python for OS utilities on RHEL 7.
Moreover, I figure that Redhat/CentOS 7 will be using an LTS version, not the latest master snapshot.
That is true for the distribution versions, but there may be developers doing some compiling themselves using latest.
I think it would be ok to start the process of removing python2 from DPDK...but...there probably needs to be some deprecation notice and time to allow people upgrade or raise any concerns.
At least, I see some test reports for LTS coming back as run on older RHEL/CentOS 7 versions (probably master too), so some people will need to schedule upgrades.
2020-02-13, Kevin Traynor:
Quoted 6 lines
That is true for the distribution versions, but there may be developers doing some compiling themselves using latest.
I think it would be ok to start the process of removing python2 from DPDK...but...there probably needs to be some deprecation notice and time to allow people upgrade or raise any concerns.
We could insert DeprecationWarnings in the python scripts when executed with python2 but I fear this could break things that rely on these scripts output.
https://docs.python.org/2/library/warnings.html#warnings.warn
I'm not sure how to prevent this kind of issues though.
About official deprecation notices, I figure the decision must be made by maintainers and/or the technical board.
Signature · 1 line
Robin
Quoted 12 lines · Robin Jarry
2020-02-13, Kevin Traynor:
Quoted 6 lines
That is true for the distribution versions, but there may be developers doing some compiling themselves using latest.
I think it would be ok to start the process of removing python2 from DPDK...but...there probably needs to be some deprecation notice and time to allow people upgrade or raise any concerns.
We could insert DeprecationWarnings in the python scripts when executed with python2 but I fear this could break things that rely on these scripts output.
Quoted 7 lines
https://docs.python.org/2/library/warnings.html#warnings.warn
I'm not sure how to prevent this kind of issues though.
About official deprecation notices, I figure the decision must be made by maintainers and/or the technical board.
Yes. I'd suggest for 20.05 perhaps putting a deprecation notice in the docs and then later (20.08) putting warnings in the code. Perhaps full removal of support should be done for 20.11, or do we need one more LTS release with the support still present?
/Bruce
2020-02-13, Bruce Richardson:
Quoted 4 lines
Yes. I'd suggest for 20.05 perhaps putting a deprecation notice in the docs and then later (20.08) putting warnings in the code. Perhaps full removal of support should be done for 20.11, or do we need one more LTS release with the support still present?
I'll prepare a documentation patch then.
Signature · 1 line
Robin
PATCH 1/1 doc: add deprecation notice for python 2 support
Now that Python 2 is officially not maintained anymore, prepare the removal of support in DPDK.
Add a deprecation notice indicating the removal schedule.
--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -0
@@ -91,3 +91,9 @@ Deprecation Notices to set new power environment if power environment was already initialized. In this case the function will return -1 unless the environment is unset first (using ``rte_power_unset_env``). Other function usage scenarios will not change. + +* python: Since the beginning of 2020, Python 2 has officially reached + end-of-support: https://www.python.org/doc/sunset-python-2/. + Python 2 support will be completely removed in 20.11. + In 20.08, explicit deprecation warnings will be displayed when running + scripts with Python 2.
Signature · 1 line
2.24.1
Re: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support
Quoted 30 lines · Robin Jarry
Now that Python 2 is officially not maintained anymore, prepare the removal of support in DPDK.
Add a deprecation notice indicating the removal schedule.
Cc Bruce Richardson <[email protected]>Cc Kevin Traynor <[email protected]>Cc Timothy Redaelli <[email protected]>Signed-off-by Robin Jarry <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +6
-0@@ -91,3 +91,9 @@ Deprecation Notices to set new power environment if power environment was already initialized. In this case the function will return -1 unless the environment is unset first (using ``rte_power_unset_env``). Other function usage scenarios will not change. + +* python: Since the beginning of 2020, Python 2 has officially reached + end-of-support: https://www.python.org/doc/sunset-python-2/. + Python 2 support will be completely removed in 20.11. + In 20.08, explicit deprecation warnings will be displayed when running + scripts with Python 2.Signature · 1 line
2.24.1
Thomas Monjalon
Acked-byRe: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support
17/02/2020 11:42, Bruce Richardson:
Quoted 18 lines · Robin Jarry
Quoted 11 lines
Now that Python 2 is officially not maintained anymore, prepare the removal of support in DPDK.
Add a deprecation notice indicating the removal schedule.
Cc Bruce Richardson <[email protected]>Cc Kevin Traynor <[email protected]>Cc Timothy Redaelli <[email protected]>Signed-off-by Robin Jarry <[email protected]>---
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 99
Quoted 5 lines
doc/guides/rel_notes/deprecation.rst +5
-0+* python: Since the beginning of 2020, Python 2 has officially reached + end-of-support: https://www.python.org/doc/sunset-python-2/. + Python 2 support will be completely removed in 20.11. + In 20.08, explicit deprecation warnings will be displayed when running + scripts with Python 2.
Quoted 1 line
Acked-by Bruce Richardson <[email protected]>
Re: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support
In reply to Robin JarryQuoted 32 lines · Robin Jarry
Now that Python 2 is officially not maintained anymore, prepare the removal of support in DPDK.
Add a deprecation notice indicating the removal schedule.
Cc Bruce Richardson <[email protected]>Cc Kevin Traynor <[email protected]>Cc Timothy Redaelli <[email protected]>Signed-off-by Robin Jarry <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +6
-0@@ -91,3 +91,9 @@ Deprecation Notices to set new power environment if power environment was already initialized. In this case the function will return -1 unless the environment is unset first (using ``rte_power_unset_env``). Other function usage scenarios will not change. + +* python: Since the beginning of 2020, Python 2 has officially reached + end-of-support: https://www.python.org/doc/sunset-python-2/. + Python 2 support will be completely removed in 20.11. + In 20.08, explicit deprecation warnings will be displayed when running + scripts with Python 2.Signature · 1 line
2.24.1
Re: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support
In reply to Robin JarryQuoted 20 lines · Robin Jarry
Now that Python 2 is officially not maintained anymore, prepare the removal of support in DPDK.
Add a deprecation notice indicating the removal schedule.
Cc Bruce Richardson <[email protected]>Cc Kevin Traynor <[email protected]>Cc Timothy Redaelli <[email protected]>Signed-off-by Robin Jarry <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +0
-0
doc/guides/rel_notes/deprecation.rst Deprecation Notices · line 99
Quoted 9 lines
doc/guides/rel_notes/deprecation.rst +6
-0@@ -91,3 +91,9 @@ Deprecation Notices to set new power environment if power environment was already initialized. In this case the function will return -1 unless the environment is unset first (using ``rte_power_unset_env``). Other function usage scenarios will not change. + +* python: Since the beginning of 2020, Python 2 has officially reached + end-of-support: https://www.python.org/doc/sunset-python-2/. + Python 2 support will be completely removed in 20.11. + In 20.08, explicit deprecation warnings will be displayed when running + scripts with Python 2.
Re: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support
In reply to Robin JarryQuoted 30 lines · Robin Jarry
Now that Python 2 is officially not maintained anymore, prepare the removal of support in DPDK.
Add a deprecation notice indicating the removal schedule.
Cc Bruce Richardson <[email protected]>Cc Kevin Traynor <[email protected]>Cc Timothy Redaelli <[email protected]>Signed-off-by Robin Jarry <[email protected]>--- doc/guides/rel_notes/deprecation.rst | 6 ++++++ 1 file changed, 6 insertions(+)doc/guides/rel_notes/deprecation.rst +6
-1@@ -91,3 +91,9 @@ Deprecation Notices to set new power environment if power environment was already initialized. In this case the function will return -1 unless the environment is unset first (using ``rte_power_unset_env``). Other function usage scenarios will not change. + +* python: Since the beginning of 2020, Python 2 has officially reached + end-of-support: https://www.python.org/doc/sunset-python-2/. + Python 2 support will be completely removed in 20.11. + In 20.08, explicit deprecation warnings will be displayed when running + scripts with Python 2. --
Quoted 2 lines
2.24.1
Signature · 1 line
David Marchand
David Marchand
Acked-by Bruce Richardson Acked-by Neil Horman Acked-by Thomas Monjalon Acked-by Kevin Traynor Acked-by on v1 1/1 AppliedRe: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support
In reply to Robin JarryQuoted 11 lines · Robin Jarry
Now that Python 2 is officially not maintained anymore, prepare the removal of support in DPDK.
Add a deprecation notice indicating the removal schedule.
Cc Bruce Richardson <[email protected]>Cc Kevin Traynor <[email protected]>Cc Timothy Redaelli <[email protected]>Signed-off-by Robin Jarry <[email protected]>
Applied, thanks.
Signature · 1 line
David Marchand