Python 2 soon to become unsupported
Python 2 will become unsupported on January 1, 2020 (https://github.com/python/devguide/pull/344 and https://pythonclock.org/). This means that Python core developers will no longer be maintaining the 2.x branch.
Consequences and considerations
Python 2 code will continue to run as long as the python executable and libraries are available for the underlying operating system. I.e., it can be kept running as a legacy system as long as you can keep it going.
However, if you have code in development, or are planning new projects, then you are strongly advised to migrate to the latest Python branch. Currently (July 2019), this is version 3.7.
In addition, many external libraries have also said that they will drop support for Python 2 (https://docs.scipy.org/doc/numpy-1.14.2/neps/dropping-python2.7-proposal.html, https://github.com/numpy/numpy/pull/12506). Following the advice is therefore a good way to avoid future problems.
Code Migration from Python 2 to Python 3
- The bad news for the migration to Python 3 is that Python 3 is not fully backward-compatible with Python 2. This means that your Python 2 code may fail if you try to run it with Python 3. So, you will probably have to fix your Python 2 source code so that migration is successful.
- The good news is that there are several tools that the Python core team provides for migration:
More details on getting your code to run in Python3 can be found here: