== Python 2, Apache's ``mod_wsgi'', and its future in Linux distributions Sometimes I have small questions about our future with Python 2, instead of big ones. [[Our Django web application DjangoORMDesignPuzzleII]] currently runs in Apache using [[mod_wsgi https://en.wikipedia.org/wiki/Mod_wsgi]], and the last time we attempted a Django upgrade (which is a necessary step in an upgrade to Python 3), [[it didn't go well Django111CSRFFailures]]. This means that we may wind up caring quite a bit about how long Ubuntu and other Linux distributions will package a version of ``mod_wsgi'' that still supports Python 2, instead of just Python 3 (assuming that [[the Linux distribution even provides Python 2 at all Python2InLinuxHowLong]]). Fedora 31 currently still provides a Python 2 sub-package of ``mod_wsgi'', but [[this should be gone in Fedora 32 https://fedoraproject.org/wiki/Changes/RetirePython2]] since it naturally depends on Python 2 and all such (sub-)packages are supposed to be purged. Debian's 'unstable' also currently seems to have the Python 2 version of ``mod_wsgi'', but it's included in [[Debian's list of Python 2 related packages to be removed https://release.debian.org/transitions/html/python2-rm.html]] ([[via https://wiki.debian.org/Python/2Removal]]), so I suspect it will be gone from the next stable Debian release. (Debian is also getting rid of Python 2 support for uwsgi, which could be another way of running our WSGI application under Apache.) What Ubuntu 20.04 will look like is an interesting question. Right now, the in-progress state of Ubuntu 'focal' (what will be 20.04) includes a libapache2-mod-wsgi package using Python 2. However, this package is listed in [[Ubuntu's list of Python 2 related packages to remove https://people.canonical.com/~ubuntu-archive/transitions/html/python2-rm.html]] ([[via https://lists.ubuntu.com/archives/ubuntu-devel/2019-November/040842.html]]). Ubuntu could still remove the package (along with others), or it could now be too close to the release of 20.04 for the removal to be carried through by then. (I believe that Ubuntu usually freezes their package set a decent amount of time before the actual release in order to allow for testing, and perhaps especially for LTS releases. I may be wrong about this, because [[the Ubuntu Focal Fossa release schedule https://wiki.ubuntu.com/FocalFossa/ReleaseSchedule]] lists the Debian import freeze as quite late, at the end of February.) Even if the Python 2 version of ``mod_wsgi'' manages to stay in Ubuntu 20.04 LTS (perhaps along with other Python 2 WSGI gateways), it will definitely be gone by the time of Ubuntu 22.04, which is when we'd normally upgrade the server that currently hosts [[our Django web app DjangoORMDesignPuzzleII]]. So by 2022, we need to have some solution for our Python 2 problem with the app, whatever it is.