Skip to content

Python 2 to Python 3 migrations

Rizky Maulana Nugraha edited this page Jan 7, 2020 · 1 revision

Migrations Roadmap

This wiki is intended to sketch out the roadmap to python 3 migrations.

We are using General Guide here

https://docs.python.org/3/howto/pyporting.html

Migrate to QGIS 3

Since Realtime uses pyqgis 3. Then migrating to QGIS 3 is the main blocker. We need to upgrade Dockerfile recipe to use official qgis/qgis LTR 3 release. After we are done with this, then the entire image will use python 3.

Upgrade to InaSAFE 5

Realtime uses InaSAFE core plugin. We need to update the orchestration to install InaSAFE 5 (which uses Python3 and QGIS 3).

Upgrade to latest dependencies

Upgrade dependencies listed in REQUIREMENTS.txt to use the latest stable python 3 compatible releases. Use: caniusepython3 to validate the dependencies

Run futurize

Run futurize to auto-refactor small issues to maintain python 2/3 compatibility.

Manually validate changes for sanity check

Run unittests or plain code review to validate changes.

Run integrated testings