Skip to contentSkip to conversation

Dropping python 2 support

dpdk-dev Applied Robin Jarry 6 participants 14 messages Feb 12, 2020 – Feb 25, 2020

lore
Share & tools
lore
#0 lore raw

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
#1 lore raw
Quoted 7 lines · Robin Jarry

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/

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.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.

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

#2 lore raw

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
#3 lore raw
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:

https://access.redhat.com/solutions/2353081

Yes, that's right.

https://wiki.centos.org/Manuals/ReleaseNotes/CentOS7.1908?action=show&redirect=Manuals%2FReleaseNotes%2FCentOS7#Major_Changes

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.

#4 lore raw

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
#5 lore raw
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

#6 lore raw

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
#7 lore raw

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.

Cc Bruce Richardson <[email protected]>
Cc Kevin Traynor <[email protected]>
Cc Timothy Redaelli <[email protected]>
---
 doc/guides/rel_notes/deprecation.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -0
index dfcca87ab95a..8f476bc5a9e9 100644
@@ -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
Acked-by on v1 1/1
#8 lore raw

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]>
---
 doc/guides/rel_notes/deprecation.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -0
index dfcca87ab95a..8f476bc5a9e9 100644
@@ -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
#9 lore raw

Re: [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]>

---

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 on v1 1/1
#10 lore raw

Re: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support

In reply to Robin Jarry
Quoted 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]>
---
 doc/guides/rel_notes/deprecation.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -0
index dfcca87ab95a..8f476bc5a9e9 100644
@@ -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
Acked-by on v1 1/1
#11 lore raw

Re: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support

In reply to Robin Jarry
Quoted 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]>
---
 doc/guides/rel_notes/deprecation.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +0 -0
index dfcca87ab95a..8f476bc5a9e9 100644

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.
Acked-by on v1 1/1
#12 lore raw

Re: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support

In reply to Robin Jarry
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]>
---
 doc/guides/rel_notes/deprecation.rst | 6 ++++++
 1 file changed, 6 insertions(+)
doc/guides/rel_notes/deprecation.rst +6 -1
index dfcca87ab95a..8f476bc5a9e9 100644
@@ -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
Acked-by Bruce Richardson Acked-by Neil Horman Acked-by Thomas Monjalon Acked-by Kevin Traynor Acked-by on v1 1/1 Applied
#13 lore raw

Re: [dpdk-dev] [PATCH] doc: add deprecation notice for python 2 support

In reply to Robin Jarry
Quoted 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]>

Applied, thanks.

Signature · 1 line
David Marchand