Uploaded image for project: 'VOLTHA'
  1. VOLTHA
  2. VOL-4777

Python 3.x upgrade

    XMLWordPrintable

    Details

    • Type: Story
    • Status: To Do (View Workflow)
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: ci-system
    • Labels:
    • Story Points:
      0

      Description

      Upgrade version of python in use to support v3.10.X+.

       

      This ticket is mainly a placeholder for system work needed.

      Consider this a BHAG ([B]ig [H]airy [A]udacious [G]oal) due to the number of dependencies and moving parts involved.

      Plenty of prep work will be needed before python 3.10.X will be usable.

       

      Python v3.10 problem:

      ERROR: ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/_init_.py)

       

      Starting in python v3.3 the module collections was modified to support abstract base class  logic.  Fast forward to python v3.10 that effort is now live complete with a change in the module namespace ( collections => collections.abc ).  Python v3.10 has become a fatal condition for legacy module syntax.

       

      +Problem source: makefile targets
      +

      % source ~/.venv/3.10.6/bin/activate
      % python --version
      Python 3.10.6

      % cd voltha-docs
      % make clean-all

      % make html

      ERROR: ImportError: cannot import name 'Mapping' from 'collections' (/usr/lib/python3.10/collections/_init_.py)

       

      Background: circa Python v3.5 & v3.6

      =============================

      During the transition from python 3.5 to 3.6 the interpreter was updated to support new syntax for printf.  This logic in turn caused problems for some build system automation, as a workaround a static python library was created to normalize behavior for the v3.5 <=> v3.6 transition:

       

      As of today with the static lib and frozen module dependencies so we are kinda anchored to (v3.6 >= python).

       

      More Jira tickets will be opened to weaken version dependencies and remove this restriction to enable upgrading the python interpreter and modules so we can pickup the latest bug fixes and security patches.

       

      At a minimum dependencies exist for voltha-docs - documentation generation.

      I have a strong suspicion given the python module robotframework is involved VOLTHA testing logic will also have an implicit dependency and may require logic changes.

       

      Short term try upgrading or removing python module version dependencies in any repositories you may be working in.  Jira tickets will be opened as specific problems are identified, upgrading modules, logic and testing early will help reduce the problem space for a final upgrade to v3.10.x+

       

       

       

        Attachments

          Issue Links

          # Subject Branch Project Status CR V

            Activity

              People

              Assignee:
              eball Eric Ball
              Reporter:
              joey Joey Armstrong
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Gerrit Reviews

                  There are no open Gerrit changes