Use Python 3 instead of Python 2
Python 2 is nearing EOL (formal cut off is 2020, last formal release is in June). Python 3 has been out since 2008 and is actively developed. The Python community encourages moving to the actively maintained and supported release of Python (Python 3) as soon as possible.
Photon's Python packages are mostly Python 3 ready, as shown below in this non-exhaustive list:
| Package | Py3 ready? |
|---|---|
| PyYAML | Yes |
| cloud-init | Yes |
| cracklib | Yes |
| createrepo | No (migrated to C) |
| deltarpm | Yes |
| dparted | ??? (can't find sources) |
| git | Yes |
| glib | Yes |
| gobject-introspection | Yes |
| google-daemon | ??? |
| google-startup-scripts | ??? |
| gtk-doc | Yes |
| hawkey | Yes |
| itstool | Yes |
| libgsystem | Yes |
| libhif | Yes |
| libselinux | Yes |
| librepo | Yes |
| libxml2 | Yes |
| krb5 | Yes |
| mercurial | Yes |
| pycurl | Yes |
| pygobject | Yes |
| python-configobj | Yes |
| python-iniparse | Yes |
| python-jsonpatch | Yes |
| python-jsonpointer | Yes |
| python-prettytable | Yes |
| python-requests | Yes |
| python-setuptools | Yes |
| python-six | Yes |
| rpm | Yes |
| urlgrabber | Yes |
The Fedora Project, for instance, has put a lot of effort into migrating its Python packages (and subpackages) to support Python 3, and I imagine you can leverage that to move forward relatively quickly.
Please don't keep it stuck in Python 2 when Python 3 is more than mature, and has nearly all of the popular libraries and toolkits ported over already.
The biggest change would be the move from yum to dnf, which is already deemed the successor to yum anyway (and works on Python 2 environments as well).
Admittedly, I've only glanced at the installer code, but it looks like it shouldn't be tough to bring over to Python 3, either.
+1.
+1
+1
@vinaykul , can you please update with the status of Python3 here.
Python3 is now available in photon full installation. Please let me know if you run into any issues using it.