Python End-of-Life Dates —
Official EOL Schedule for Every Version
Python 3.8 reached end of life in October 2024. Python 3.9 followed in October 2025. Python 3.11 is approaching its EOL date in October 2026 — six months from now. And Python 2.7 has been dead since January 2020, yet it still runs in more production environments than anyone admits.
This is the single authoritative reference for Python end-of-life dates across every major version — with EOL Risk Scores™, migration notes, and plain-English guidance on what to do if you're running past end of support.
- Complete Python EOL schedule — all versions
- Python 3.8 — end of life October 2024
- Python 3.9 — end of life October 2025
- Python 3.10 — end of life October 2026
- Python 3.11 — end of life October 2026
- Python 3.12 — current stable
- Python 3.13 — latest release
- What the EOL Risk Score means
- How to migrate safely
Complete Python EOL Schedule
Python releases a new minor version (3.x) roughly every October and supports each version for five years. The table below covers every Python 3.x version and its official end-of-life date as published by the Python Software Foundation.
| Version | Released | End of Life | Status | EOL Risk Score™ |
|---|---|---|---|---|
| Python 2.7 | Jul 2010 | Jan 1, 2020 | EOL | 98 |
| Python 3.6 | Dec 2016 | Dec 23, 2021 | EOL | 95 |
| Python 3.7 | Jun 2018 | Jun 27, 2023 | EOL | 92 |
| Python 3.8 | Oct 2019 | Oct 31, 2024 | EOL | 88 |
| Python 3.9 | Oct 2020 | Oct 31, 2025 | EOL | 82 |
| Python 3.10 | Oct 2021 | Oct 31, 2026 | EOL in 6 months | 48 |
| Python 3.11 | Oct 2022 | Oct 31, 2026 | EOL in 6 months | 44 |
| Python 3.12 | Oct 2023 | Oct 31, 2028 | Stable | 22 |
| Python 3.13 | Oct 2024 | Oct 31, 2029 | Latest | 15 |
Python 3.8 — End of Life October 31, 2024
Python 3.8 reached its official end-of-life date on October 31, 2024. It has been unsupported for over six months. No security patches, no bug fixes, no CVE remediation.
Python 3.8 was the version that introduced the walrus operator (:=), positional-only parameters, and significant performance improvements to the dict implementation. It became the default Python on Ubuntu 20.04 LTS — which means any server still running Ubuntu 20.04 is very likely running Python 3.8 as its system Python.
Migrating from Python 3.8
- Target Python 3.12 — it's the current stable release and supported until 2028
- Run
python -m py_compileon your codebase against 3.12 to catch syntax issues early - Check
distutilsusage — it was deprecated in 3.10 and removed in 3.12 - Replace
asyncio.get_event_loop()withasyncio.get_running_loop() - Use
pyupgrade --py312-plusto automatically modernize syntax
Python 3.9 — End of Life October 31, 2025
Python 3.9 reached end of life on October 31, 2025. It introduced built-in generic types (list[int] instead of List[int] from typing), the | merge operator for dicts, and became the default Python on Ubuntu 22.04 LTS.
Python 3.9 had a long tail of adoption because Ubuntu 22.04 shipped it as the default. Many Docker base images still use python:3.9 as their foundation. If you're pulling from Docker Hub without pinning to a specific digest, you may be running 3.9 in containers without realising it.
Check your Docker base images
Run docker inspect <image> | grep -i python on your production containers. If you see 3.9 or earlier, that's your migration target. Update your Dockerfiles to FROM python:3.12-slim and rebuild.
Python 3.10 — End of Life October 31, 2026
Python 3.10 reaches end of life on October 31, 2026 — approximately six months from now. It introduced structural pattern matching (match/case), better error messages, and parenthesized context managers.
If you adopted Python 3.10 specifically for pattern matching, the good news is that Python 3.12 fully supports it with further improvements. The migration path from 3.10 to 3.12 is straightforward for most codebases.
Python 3.11 — End of Life October 31, 2026
Python 3.11 reaches end of life on October 31, 2026. It was the fastest Python release in years — benchmarks showed 10–60% performance improvements over Python 3.10, driven by the Specializing Adaptive Interpreter. Many teams upgraded specifically for these gains.
The EOL date is six months away. That sounds comfortable. It isn't — especially for larger codebases with complex dependency trees. The average Python migration across a medium-sized application takes 4–8 weeks when you factor in dependency compatibility testing, CI pipeline updates, and staged rollouts.
Start your Python 3.11 migration now
- Run
pip install -r requirements.txtagainst Python 3.12 in a fresh venv — most failures surface immediately - Check
setuptoolsandpkg_resourcesusage — both are deprecated in newer pip tomllibis now in stdlib — remove thetomlibackport dependency- Exception groups (
ExceptionGroup) are available in 3.11+ and 3.12 — no migration needed - Run your full test suite on 3.12 in CI before touching production
Python 3.12 — Current Stable, Supported Until 2028
Python 3.12 is the current stable release and the recommended migration target for teams on 3.8, 3.9, 3.10, or 3.11. It is supported until October 31, 2028 — giving you a two-year runway from today.
Python 3.12 brings further performance improvements, a new @override decorator for type checking, improved f-string parsing, and the removal of long-deprecated modules including distutils, aifc, cgi, and chunk. The removal of distutils is the most common migration blocker — check for it before upgrading.
Python 3.13 — Latest Release
Python 3.13 is the latest release, available since October 2024 and supported until October 31, 2029. It introduces an experimental free-threaded mode (PEP 703 — removing the GIL), a new interactive interpreter (REPL), and continued performance work from the Faster CPython project.
For most production deployments, Python 3.12 is the right choice today. Python 3.13's free-threaded mode is experimental and not recommended for production. Adopt 3.13 when your key dependencies have confirmed compatibility.
What the EOL Risk Score™ Means for Python
Every Python version page on endoflife.ai carries an EOL Risk Score™ — a 0–100 score measuring the actual security and operational risk of running that version in production. Four factors drive the score:
- EOL Recency (40pts) — Python 2.7, six years past EOL, scores 98. Python 3.11, still supported, scores 44.
- Attack Surface (30pts) — Python runs web servers, processes data, executes arbitrary code. CVEs in EOL versions are never patched.
- CISA KEV Exposure (20pts) — whether known exploited vulnerabilities exist for this version in the CISA catalog.
- Extended Support Availability (10pts) — commercial extended support options for Python are limited, which increases urgency.
How to Migrate Safely
Step 1 — Test against the target version first
Create a fresh virtual environment with Python 3.12: python3.12 -m venv venv-test. Install your full requirements.txt. Note every failure — these are your migration tasks.
Step 2 — Check for removed modules
Python 3.12 removed distutils, aifc, cgi, cgitb, chunk, crypt, imghdr, mailcap, msilib, nis, nntplib, ossaudiodev, pipes, sndhdr, spwd, sunau, telnetlib, uu, and xdrlib. Run grep -r "import distutils\|from distutils" . to find usage in your codebase.
Step 3 — Use pyupgrade for automatic fixes
pip install pyupgrade then run pyupgrade --py312-plus **/*.py. It automatically updates old-style type hints, string formatting, and deprecated patterns. Safe to run on any codebase.
Step 4 — Update CI before production
Change your CI matrix to include Python 3.12. Run your full test suite. Fix failures. Only promote to production after a clean CI run. Use .python-version or pyproject.toml to pin the version explicitly.
Step 5 — Update your Docker base images
Change FROM python:3.11 to FROM python:3.12-slim in all Dockerfiles. Rebuild and test. The -slim variant reduces image size significantly and is appropriate for most production workloads.