Jump to: navigation, search

Difference between revisions of "StarlingX/Python2"

m (Stories)
 
(22 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
= Python2 to Python3 Transition Sub-project =
 
= Python2 to Python3 Transition Sub-project =
 +
 +
'''October 2021 PTG: This project is no longer active'''
  
 
=== Team Information ===
 
=== Team Information ===
Line 8: Line 10:
 
=== Team Objective / Priorities ===
 
=== Team Objective / Priorities ===
 
Python 2 support will be ending in the community in 2020.  We have a lot of Python2 code that needs to be converted to be 2/3 compatible.
 
Python 2 support will be ending in the community in 2020.  We have a lot of Python2 code that needs to be converted to be 2/3 compatible.
 +
* Guide for the compatible code:
 +
  http://python-future.org/compatible_idioms.html
 +
* OpenStack Python3 reference
 +
  https://wiki.openstack.org/wiki/Python3#Common_patterns
 +
  https://etherpad.openstack.org/p/liberty-cross-project-python3
  
 
=== Story Board Tags ===
 
=== Story Board Tags ===
Line 13: Line 20:
  
 
=== Team Work Items ===
 
=== Team Work Items ===
==== Stories ====
+
==== Stories / Bugs ====
* All  
+
* Story Board
** [https://storyboard.openstack.org/#!/story/list?status=active&tags=stx.python2&project_group_id=86 Active Stories]  
+
** All
** [https://storyboard.openstack.org/#!/story/list?status=merged&tags=stx.python2&project_group_id=86 Merged Stories]
+
*** [https://storyboard.openstack.org/#!/story/list?status=active&tags=stx.python2&project_group_id=86 Active Stories]  
* stx.2018.10
+
*** [https://storyboard.openstack.org/#!/story/list?status=merged&tags=stx.python2&project_group_id=86 Merged Stories]
** [https://storyboard.openstack.org/#!/story/list?status=active&tags=stx.python2&tags=stx.2018.10&project_group_id=86 stx.2018.10 Active Stories]
+
** Active Release - stx.2.0
** [https://storyboard.openstack.org/#!/story/list?status=merged&tags=stx.python2&tags=stx.2018.10&project_group_id=86 stx.2018.10 Merged Stories]
+
*** [https://storyboard.openstack.org/#!/story/list?status=active&tags=stx.python2&tags=stx.2.0&project_group_id=86 Active Stories]
 +
** Active Release - stx.3.0
 +
*** [https://storyboard.openstack.org/#!/story/list?status=active&tags=stx.python2&tags=stx.3.0&project_group_id=86 Active Stories]
 +
** Active Release - stx.4.0
 +
*** [https://storyboard.openstack.org/#!/story/list?status=active&tags=stx.python2&tags=stx.4.0&project_group_id=86 Active Stories]
 +
* Launchpad Bugs
 +
** All
 +
*** [https://bugs.launchpad.net/starlingx/+bugs?field.tag=stx.python2 Open Bugs]
 +
*** [https://bugs.launchpad.net/starlingx/+bugs?field.searchtext=&orderby=-importance&field.status%3Alist=FIXRELEASED&assignee_option=any&field.assignee=&field.bug_reporter=&field.bug_commenter=&field.subscriber=&field.structural_subscriber=&field.tag=stx.python2&field.tags_combinator=ANY&field.has_cve.used=&field.omit_dupes.used=&field.omit_dupes=on&field.affects_me.used=&field.has_patch.used=&field.has_branches.used=&field.has_branches=on&field.has_no_branches.used=&field.has_no_branches=on&field.has_blueprints.used=&field.has_blueprints=on&field.has_no_blueprints.used=&field.has_no_blueprints=on&search=Search Fixed Bugs]
 +
** Active Release - stx.2.0
 +
*** [https://bugs.launchpad.net/starlingx/+bugs?field.tag=stx.python2+stx.2.0&field.tags_combinator=ALL Open Bugs]
 +
 
 
* There is an Etherpad with some notes [https://etherpad.openstack.org/p/stx-python-2-to-3 here].   
 
* There is an Etherpad with some notes [https://etherpad.openstack.org/p/stx-python-2-to-3 here].   
 
* There is a Story with a good summary of the work needed [https://storyboard.openstack.org/#!/story/2002909 here].
 
* There is a Story with a good summary of the work needed [https://storyboard.openstack.org/#!/story/2002909 here].
Line 34: Line 52:
 
* We also use packages that have Python2 code.  We need to replace and/or update such packages.  Need to identify that list.
 
* We also use packages that have Python2 code.  We need to replace and/or update such packages.  Need to identify that list.
 
* Once all the P2 code is removed we need to remove the P2 dependencies
 
* Once all the P2 code is removed we need to remove the P2 dependencies
 +
* some c code will support python and we should analysis such code
 +
  For example cgcs-root/stx/stx-fault/fm-common/sources/fm_python_mod_main.cpp , " #include <python2.7/Python.h>"
  
 
=== Python3 Transition Status ===
 
=== Python3 Transition Status ===
Line 44: Line 64:
 
|stx-config  || '''N''' ||  || https://storyboard.openstack.org/#!/story/2003433 || N || N || Risk: 1. grubby-8.28 is used in stx-config/puppet-manifests for system config, Python 2.7 only and no Python 3 version.
 
|stx-config  || '''N''' ||  || https://storyboard.openstack.org/#!/story/2003433 || N || N || Risk: 1. grubby-8.28 is used in stx-config/puppet-manifests for system config, Python 2.7 only and no Python 3 version.
 
|-
 
|-
|stx-fault  || Y || Python 2/3 compatible || Merged: https://storyboard.openstack.org/#!/story/2003310 || Y || Y ||  
+
|stx-distcloud  || '''N''' || || https://storyboard.openstack.org/#!/story/2004585 || N || N || need work on it.
 
|-
 
|-
|stx-gplv2  || na || No Python Code || || N || N ||  
+
|stx-distcloud-client || '''N''' || ||https://storyboard.openstack.org/#!/story/2004586  || || || this is newly added repo. Need scan.
 
|-
 
|-
|stx-gplv3  || '''N''' || || going to be merged || N || N || stx-gplv3/python-keyring patches, need upgrade srpm and rework the patches.
+
|stx-fault  || Y || Python 2/3 compatible || Merged: https://storyboard.openstack.org/#!/story/2003310 || Y || Y ||  
 
|-
 
|-
|stx-gui  || '''N''' || || https://storyboard.openstack.org/#!/story/2003432 || N || N ||  
+
|stx-gui  || '''Y''' || || https://storyboard.openstack.org/#!/story/2003432 || Y || Y ||  
 
|-
 
|-
|stx-ha  || '''N''' || || https://storyboard.openstack.org/#!/story/2003430 || N || N ||  
+
|stx-ha  || '''Y''' || || https://storyboard.openstack.org/#!/story/2003430 || Y || Y ||  
 
|-
 
|-
 
|stx-integ  || '''N''' || can start working now (10 patches) || https://storyboard.openstack.org/#!/story/2002909 || N || N || Risk: stx-integ/extended/python-cephclient (old cephclient with WRS patches, but no Python 3 version)
 
|stx-integ  || '''N''' || can start working now (10 patches) || https://storyboard.openstack.org/#!/story/2002909 || N || N || Risk: stx-integ/extended/python-cephclient (old cephclient with WRS patches, but no Python 3 version)
 
|-
 
|-
|stx-metal  || '''N''' || can start working now (2 patches) || https://storyboard.openstack.org/#!/story/2003426 || N || N ||  
+
|stx-metal  || '''Y''' || Python 2/3 compatible || Merged:https://storyboard.openstack.org/#!/story/2003426 || Y || Y ||  
 
|-
 
|-
 
|stx-nfv  || '''N''' || can start working now (11 patches) || https://storyboard.openstack.org/#!/story/2003427 || N || N ||  
 
|stx-nfv  || '''N''' || can start working now (11 patches) || https://storyboard.openstack.org/#!/story/2003427 || N || N ||  
 
|-
 
|-
|stx-update  || '''N''' || can start working now (7 patches) || https://storyboard.openstack.org/#!/story/2003429 || N || N || Risk: 1. createrepo-0.9.9 is used by cgcs-patch-controller, Python 2.7 only and no Python 3 version
+
|stx-update  || '''N''' || can start working now (7 patches) || Merged:https://storyboard.openstack.org/#!/story/2003429 || Y|| Y || Risk: 1. createrepo-0.9.9 is used by cgcs-patch-controller, Python 2.7 only and no Python 3 version
 
|-
 
|-
|stx-upstream  || '''N''' || can start working now (5 patches) || https://storyboard.openstack.org/#!/story/2003428 || N || N ||  
+
|stx-upstream  || '''Y''' || Python 2/3 compatible || Merged:https://storyboard.openstack.org/#!/story/2003428 || Y|| Y ||  
 
|-
 
|-
 
|stx-utils  || na || No Python Code || || N || N ||  
 
|stx-utils  || na || No Python Code || || N || N ||  
Line 139: Line 159:
 
|stx-ryu  || Y || ''Python 3.4'' || || N || N || latest version still Python 3.4, used by neutron.  
 
|stx-ryu  || Y || ''Python 3.4'' || || N || N || latest version still Python 3.4, used by neutron.  
 
|}
 
|}
 +
 +
==== RPMs python3 info ====
 +
The RPM depends checking excel is attached to https://bugs.launchpad.net/starlingx/+bug/1808073 , please check this bug for details.

Latest revision as of 14:42, 27 October 2021

Python2 to Python3 Transition Sub-project

October 2021 PTG: This project is no longer active

Team Information

  • Project Lead: Cindy Xie <cindy.xie@intel.com>
  • Technical Lead:
  • Contributors: Austin Sun <austin.sun@intel.com>; Yan Chen <yan.chen@intel.com>

Team Objective / Priorities

Python 2 support will be ending in the community in 2020. We have a lot of Python2 code that needs to be converted to be 2/3 compatible.

  • Guide for the compatible code:
 http://python-future.org/compatible_idioms.html
  • OpenStack Python3 reference
 https://wiki.openstack.org/wiki/Python3#Common_patterns
 https://etherpad.openstack.org/p/liberty-cross-project-python3

Story Board Tags

All story board stories created for this team should use the tag "stx.python2" and the prefix [Python2].

Team Work Items

Stories / Bugs

  • There is an Etherpad with some notes here.
  • There is a Story with a good summary of the work needed here.

Deliverables for this sub-project

  1. All python code in StarlingX is python 3 compatible
  2. All python repos have Zuul jobs which check for python 3 compatibility
  3. All Zuul jobs are made Voting
  4. Once all the Python 2 code is removed, any python 2 support packages are removed from the build and build mirror

ToDo

  • Turn the Notes in the Etherpad into Stories
  • Write stories for each of the repos in the table below and list the Links in the table below
  • We also use packages that have Python2 code. We need to replace and/or update such packages. Need to identify that list.
  • Once all the P2 code is removed we need to remove the P2 dependencies
  • some c code will support python and we should analysis such code
  For example cgcs-root/stx/stx-fault/fm-common/sources/fm_python_mod_main.cpp , " #include <python2.7/Python.h>"

Python3 Transition Status

Project Python3 Compatible (Y/N) Python Version Links Zuul checker enabled Zuul checker made Voting Comments
stx-clients na No Python Code N N
stx-config N https://storyboard.openstack.org/#!/story/2003433 N N Risk: 1. grubby-8.28 is used in stx-config/puppet-manifests for system config, Python 2.7 only and no Python 3 version.
stx-distcloud N https://storyboard.openstack.org/#!/story/2004585 N N need work on it.
stx-distcloud-client N https://storyboard.openstack.org/#!/story/2004586 this is newly added repo. Need scan.
stx-fault Y Python 2/3 compatible Merged: https://storyboard.openstack.org/#!/story/2003310 Y Y
stx-gui Y https://storyboard.openstack.org/#!/story/2003432 Y Y
stx-ha Y https://storyboard.openstack.org/#!/story/2003430 Y Y
stx-integ N can start working now (10 patches) https://storyboard.openstack.org/#!/story/2002909 N N Risk: stx-integ/extended/python-cephclient (old cephclient with WRS patches, but no Python 3 version)
stx-metal Y Python 2/3 compatible Merged:https://storyboard.openstack.org/#!/story/2003426 Y Y
stx-nfv N can start working now (11 patches) https://storyboard.openstack.org/#!/story/2003427 N N
stx-update N can start working now (7 patches) Merged:https://storyboard.openstack.org/#!/story/2003429 Y Y Risk: 1. createrepo-0.9.9 is used by cgcs-patch-controller, Python 2.7 only and no Python 3 version
stx-upstream Y Python 2/3 compatible Merged:https://storyboard.openstack.org/#!/story/2003428 Y Y
stx-utils na No Python Code N N
stx-docs N N N
stx-root na Build-time enviroment N N
stx-tools na Build-time enviroment N N
Staging Project Python3 Compatible (Y/N) Python Version Links Zuul checker enabled Zuul checker made Voting Comments
stx-ceilometer Y Python 3.5 N N
stx-ceph Y Python 3 (minor not specified) N N latest version specified Python 3.4
stx-cinder Y Python 2.7 + Python 3 compatible patches N N Latest version has Python 3.5 support.
stx-glance N Python 2.7 (blocked) N N
stx-heat Y Python 3.5 N N
stx-horizon Y Python 3.5 N N
stx-ironic N Python 2.7 N N Not used now.
stx-keystone Y Python 3.5 N N
stx-kingbird Y Python 3.4 N N latest version still Python 3.4
stx-libvirt Y Python 3 (minor not specified) N N
stx-magnum-ui Y Python 3.5 N N
stx-murano Y Python 3.5 N N
stx-murano-dashboard Y Python 3.5 N N
stx-networking-bgpvpn Y Python 3.5 N N
stx-networking-odl Y Python 3.5 N N
stx-networking-sfc Y Python 3.5 N N
stx-neutron Y Python 3.5 N N
stx-neutron-dynamic-routing Y Python 3.5 N N
stx-neutron-lib Y Python 3.5 N N
stx-nova Y Python 3.5 N N
stx-openstacksdk Y Python 3.5 N N
stx-python-ceilometerclient Y Python 3.5 N N
sx-python-cinderclient Y Python 3.5 N N
stx-python-glanceclient Y Python 3.5 N N
stx-python-kingbirdclient Y Python 3.4 N N latest version still Python 3.4
stx-python-magnumclient Y Python 3.5 N N
stx-python-muranoclient Y Python 3.5 N N
stx-python-neutronclient Y Python 3.5 N N
stx-python-novaclient Y Python 3.5 N N
stx-qemu N Python 2.7 N N python scripts under folder qemu/scripts and qemu/tests, but only dump-guest-memory.py is packed into the rpm.
stx-ryu Y Python 3.4 N N latest version still Python 3.4, used by neutron.

RPMs python3 info

The RPM depends checking excel is attached to https://bugs.launchpad.net/starlingx/+bug/1808073 , please check this bug for details.