The Python 2 language, i.e. Python 2.7.x, is officially being discontinued on January 1, 2020 (first planned for 2015) after which security patches and other improvements will not be released for it. With Python 2's end-of-life, only Python 3.5.x and later will be supported.Due to differences in the two versions of Python, there are two main impacts on the code on the current web version of ADS.
- "print expr" produces an error and needs to be replaced with "print(expr)"
- map produces an iterator instead of a list. This is fixed by wrapping list( ) around the map expression if the original output is as desired. More about iterators.
- keys of a dictionary are are also an iterator and using list is the fix in this situation too.
Fortunately the PreTeXt project has my back and an automated system has been developed to identify all the problems. I hope to have an updated web version ready for the spring semester.