Why and How to Upgrade from Python 3.7 Before Its End‑of‑Life
The article explains that Python 3.7 will reach end‑of‑life in June 2023, outlines the risks of staying on an unsupported version, and provides a step‑by‑step migration path to newer Python releases to ensure security and dependency compatibility.
Upgrading to a new Python version is work, but it may not directly benefit end users who care more about features and bug fixes than the developer's upgrade schedule.
Many developers still use Python 3.7; as of December 2022, nearly 30% of PyPI downloads target this version, reflecting its continued presence in CI pipelines and other environments.
However, the upgrade window is limited: Python 3.7 reaches end‑of‑life in June 2023, after which no bug or security fixes will be released.
Python 3.7 was released in June 2018. According to PEP 537, sub‑versions with bug and security fixes were released every three months for the first two years, then only as‑needed security fixes, and support ends five years after release.
Thus, June 2023 is the last month for official Python 3.7 releases; from July 2023 onward, any discovered security vulnerabilities will not be patched by the core development team.
All releases after 3.7.9 consist solely of security fixes; the latest 3.7.16 (released 6 December 2022) contains five distinct security patches addressing issues from denial‑of‑service to buffer overflows.
Some Linux distributions provide long‑term support, including security updates, for the Python version they ship. If you use such a distribution that includes Python 3.7, you can rely on its security updates even after the upstream team stops support.
In theory you could continue using 3.7, but practical warnings exist.
Most mainstream distributions no longer ship Python 3.7:
Red Hat and its clones never include Python 3.7.
Ubuntu 18.04 offers 3.7 as a universe component, but its security updates depend on community support and the last update was December 2021; newer LTS releases (20.04, 22.04) do not include 3.7.
Debian 10 (Buster) includes 3.7, but Debian 11 does not.
Linux distributions only backport the most critical security fixes, leaving many patches unavailable in their packaged versions.
Long‑term support periods are finite: Debian Buster ends its own security updates in June 2024, and Ubuntu 18.04 ends standard security updates in April 2023, after which paid support is required.
Third‑party Python libraries and frameworks will start dropping support for 3.7 after June 2023, meaning critical bugs may remain unfixed on that version and distributions will not backport fixes for every library.
Some libraries have already ceased supporting Python 3.7.
Now is the time to upgrade from 3.7. In the short term, aim to move to a Python version that still receives dependency updates. For example, the last Pandas release compatible with 3.7 was in December 2021, so upgrading to at least Python 3.8 is advisable.
Fortunately, Python versions are fairly backward‑compatible, allowing a gradual migration:
Upgrade to 3.8.
Fix any errors you encounter.
Upgrade to 3.9 and fix errors.
Continue this process until you reach Python 3.10 or, around early 2023, Python 3.11.
Free Python Course – Scan the QR code below to receive hundreds of gigabytes of curated learning material, including e‑books, tutorials, project templates, source code, and more.
Recommended reading:
The strongest explanation! Python package dependency management solved!
Why you must learn Python in university?
Write a probabilistic programming language in 70 lines of Python
How big is the gap between programmers earning 10k and 40k?
Python Programming Learning Circle
A global community of Chinese Python developers offering technical articles, columns, original video tutorials, and problem sets. Topics include web full‑stack development, web scraping, data analysis, natural language processing, image processing, machine learning, automated testing, DevOps automation, and big data.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.