This document is inteded to give a rough plan how to achieve an upgrade of SENAITE to the latest Plone 5 codebase in combination with Python 3. Therfore, it is named P8.
The current codebase of SENAITE is only compatible with Plone 4 and Python 2.x. Python stops support for the 2.x series by January 2020.
SENAITE needs to be first compatible with Plone 5 in combination with Python 2. It need then to be checked if the Archetypes framework is compatible with Python 3 or not.
It need then to be considered to migrate existing content types to the new Dexterity or stick to Archetypes and try to make this framework compatible to Python 3.
Especially the compatibility with customer addons and the migration of all the Archetypes based fields need to be considered in this step.
This roadmap outlines the most important steps of the upgrade process in a logical order:
- Accomplish to upgrade to Plone 5
- Make the codebase Python 2/3 compatible with six
- Upgrade non-complex content types to Dexterity, e.g. controlpanel folders
- Upgrade JavaScript libraries, especially compatibility with the latest jQuery library
- Upgrade Archetypes fields to z3c.form fields
- Upgrade non-complex fields to Dexterity
- Upgrade to Python 3
This section lists the most importatnt snippets how to use the six library already today in the SENAITE codebase to prepare the code for Python 3 compatibility.
This section is inteded to grow on the way
https://six.readthedocs.io/#six.string_types
Before:
if isinstance(thing, basestring):
...
After:
import six
if isinstance(thing, six.string_types):
...
Migrating the SENAITE Project to Plone 5 and Python 3 is a huge effort and cannot be achieved without the support of the community.
Please consider therefore to support us to keep SENAITE an open-source success story: https://community.senaite.org/t/how-can-senaite-be-maintained-open-source
- NARALABS: https://naralabs.com
- RIDING BYTES: https://www.ridingbytes.com