AWS Builder Center

Python 3.10 EOL: Automate Your Fleet Upgrade

Python 3.10 hits end-of-life in October 2026. Upgrade your fleet to 3.13 in an afternoon with AWS Transform, real before/after code, tests green

Python 3.10 reaches end-of-life in October 2026. After that, no more security patches. Here's how to upgrade your entire Python fleet to 3.13 in an afternoon using ATX's AWS-managed transformation, with real before/after code and 5/5 tests passing.



The Deadline

Python 3.10 EOL Timeline, October 2026

Python 3.10 reaches end-of-life on October 4, 2026 [1]. After that date: no security patches, no bug fixes, no support. If you're running production services on 3.10, you're four months away from running unpatched software.
This isn't theoretical risk. Python 3.9 went EOL in October 2025, and a CVE affecting its  http.cookies  module was disclosed three weeks later [2]. Teams that hadn't upgraded were scrambling to backport patches to an unsupported runtime.
The Python ecosystem has moved aggressively. As of early 2026, PyPI download statistics show Python 3.12 and 3.13 accounting for over 60% of package downloads [3]. Libraries are dropping 3.10 support: Pydantic 2.7+ requires 3.9+, and upcoming major versions of FastAPI, SQLAlchemy, and Django are targeting 3.11+ as their minimum.
If you have 10, 50, or 200 services on Python 3.10, the upgrade window is closing. Doing it manually, one repo at a time, grepping for deprecated patterns, running tests, fixing failures, takes about an hour per service. If you've ever opened a PR that was supposed to be "just bump the Python version" and ended up touching 40 files, you know the shape of this work. At 50 services, that's a full sprint of engineering time that could go toward features instead.
AWS Transform Custom has an AWS-managed transformation for exactly this:  AWS/python-version-upgrade . It handles the mechanical work so you can focus on the services that need human judgment.

What Changes Between 3.10 and 3.13

Before running the tool, it helps to know what actually breaks or gets deprecated:
Pattern
3.10 Status
3.13 Status
Migration
 typing.Dict ,  typing.List ,  typing.Tuple 
Deprecated (3.9)
Still works but discouraged
Use  dict ,  list ,  tuple 
 typing.Optional[X] 
Works
Works but verbose
Use  X | None 
 typing.Union[X, Y] 
Works
Works but verbose
Use  X | Y 
 collections.OrderedDict 
Works
Works but unnecessary
Use  dict  (ordered since 3.7)
 importlib.resources.read_text() 
Deprecated (3.11)
Emits DeprecationWarning
Use  .files().joinpath().read_text() 
 %-formatting 
Works
Works
Use f-strings (readability)
 asyncio.get_event_loop() 
Behavior changed (3.10+)
Different default
Use  asyncio.new_event_loop()  or  asyncio.run() 
None of these are hard to fix individually. But they accumulate. A typical service might have 20-30 instances across its codebase. You open a file to change  List[str]  to  list[str] , notice the  % -formatting next to it, and a five-minute fix becomes a twenty-minute refactor. The real value of automation here isn't that any single change is difficult. It's that the tool finds and applies all of them consistently, in one pass, without missing any.

The Starting Point

A FastAPI data processing service, representative of a typical Python 3.10 codebase with accumulated patterns:
"""Data processor service, uses Python 3.10 patterns that should be modernized."""

from typing import Optional, Union
from collections import OrderedDict

from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI(title="Data Processor", version="1.0.0")

class DataItem(BaseModel):
id: str
name: str
tags: Optional[list[str]] = None
metadata: Optional[dict[str, Union[str, int, float]]] = None

class ProcessResult(BaseModel):
processed: int
errors: int
results: list[dict[str, Union[str, int]]]

from typing import Dict, List, Tuple

def process_batch(items: List[Dict[str, str]]) -> Tuple[int, List[str]]:
"""Process a batch of items. Uses deprecated typing imports."""
processed = []
for item in items:
if "name" in item:
processed.append(item["name"].upper())
return len(processed), processed

def build_summary(data: list[dict]) -> OrderedDict:
"""Build an ordered summary. OrderedDict is unnecessary since 3.7."""
summary = OrderedDict()
for item in data:
key = item.get("category", "unknown")
summary[key] = summary.get(key, 0) + 1
return summary

def format_report(title: str, count: int, errors: int) -> str:
"""Format a report string. Uses % formatting instead of f-strings."""
return "Report: %s - Processed %d items with %d errors" % (title, count, errors)

import importlib.resources

def load_config(package: str, filename: str) -> str:
"""Load config from package resources. Uses deprecated API."""
return importlib.resources.read_text(package, filename)
Five tests pass. The code works fine on 3.12 (which is what we're running locally). It's just full of patterns that modern Python has moved past, the kind of code that works but signals to every reader that it was written before better syntax existed. Python's  typing  module was essential in 3.5. By 3.10, built-in generics made much of it redundant. By 3.13, using  List[str]  instead of  list[str]  is like a signpost saying "this code hasn't been touched in a while."

Running the Upgrade

cd data-processor
git init && git add . && git commit -m "initial: Python 3.10 data processor"

aws configure # configure AWS credentials (or use env vars / a profile)
atx
I describe what I want:
> Upgrade this Python project to Python 3.13. Modernize all deprecated
patterns including typing imports (use built-in generics), string
formatting (use f-strings), and importlib.resources usage. Update
pyproject.toml requires-python. Validation command: pytest tests/ -v
ATX finds the AWS-managed transformation immediately:
ATX: There's an AWS-managed transformation that covers exactly this use case:
"AWS/python-version-upgrade". It supports migrating Python projects from
3.8/3.9 to 3.11/3.12/3.13, including modernizing deprecated patterns like
typing imports, string formatting, and updating pyproject.toml.

Would you like me to apply "AWS/python-version-upgrade" to your project?
I confirm, specify Python 3.13 as the target, and ATX proceeds. It creates a dedicated branch ( atx-result-staging-20260617_151927_3b0adae9 ), analyzes the code, applies the transformations, and validates with pytest.

What ATX Produced

ATX Python Upgrade Flow, Before/After with Multi-Agent Pipeline

The modernized code:
"""Data processor service, modernized for Python 3.13."""

import importlib.resources

from fastapi import FastAPI
from pydantic import BaseModel

app = FastAPI(title="Data Processor", version="1.0.0")

class DataItem(BaseModel):
id: str
name: str
tags: list[str] | None = None
metadata: dict[str, str | int | float] | None = None

class ProcessResult(BaseModel):
processed: int
errors: int
results: list[dict[str, str | int]]

def process_batch(items: list[dict[str, str]]) -> tuple[int, list[str]]:
"""Process a batch of items."""
processed = []
for item in items:
if "name" in item:
processed.append(item["name"].upper())
return len(processed), processed

def build_summary(data: list[dict]) -> dict:
"""Build a summary."""
summary = {}
for item in data:
key = item.get("category", "unknown")
summary[key] = summary.get(key, 0) + 1
return summary

def format_report(title: str, count: int, errors: int) -> str:
"""Format a report string."""
return f"Report: {title} - Processed {count} items with {errors} errors"

def load_config(package: str, filename: str) -> str:
"""Load config from package resources."""
return importlib.resources.files(package).joinpath(filename).read_text()
Clean. Modern. Zero deprecation warnings.

The Transformation Breakdown

Before (Python 3.10 patterns)
After (Python 3.13 modern)
 from typing import Optional, Union 
Removed (not needed)
 from typing import Dict, List, Tuple 
Removed (use built-ins)
 from collections import OrderedDict 
Removed (unnecessary since 3.7)
 Optional[list[str]] 
 list[str] | None 
 dict[str, Union[str, int, float]] 
 dict[str, str | int | float] 
 List[Dict[str, str]] 
 list[dict[str, str]] 
 Tuple[int, List[str]] 
 tuple[int, list[str]] 
 OrderedDict() 
 dict()  (plain dict, return type  -> dict )
 "Report: %s - %d items" % (title, count) 
 f"Report: {title} - {count} items" 
 importlib.resources.read_text(pkg, file) 
 importlib.resources.files(pkg).joinpath(file).read_text() 
 requires-python = ">=3.10" 
 requires-python = ">=3.13" 
 "fastapi>=0.95.0" 
 "fastapi>=0.115.0" 
 "pydantic>=1.10" 
 "pydantic>=2.0" 
 "pytest>=7.0" 
 "pytest>=8.0" 
ATX also:
  • Reorganized imports (moved  importlib.resources  to the top)
  • Cleaned up docstrings (removed "uses deprecated..." comments)
  • Bumped all dependency versions to 3.13-compatible minimums

Validation: 5/5 Tests Pass

$ pytest tests/ -v
tests/test_processor.py::test_health PASSED [ 20%]
tests/test_processor.py::test_process_data PASSED [ 40%]
tests/test_processor.py::test_process_batch PASSED [ 60%]
tests/test_processor.py::test_build_summary PASSED [ 80%]
tests/test_processor.py::test_format_report PASSED [100%]

5 passed in 0.35s
ATX validated with Python 3.13.11 specifically. It created a 3.13 virtual environment, installed dependencies, and confirmed all tests pass on the target runtime. Not just "the syntax is valid" but "it actually runs correctly on 3.13."
Cost: In one example run this took a few agent minutes at $0.035/agent-minute, on the order of ~$0.10 for this small service (a larger service, or more validation/self-correction cycles, will cost more). Agent-minutes are non-deterministic, so treat per-service and fleet totals as estimates and run a pilot to establish your own baseline. Either way it's a fraction of the equivalent manual engineering time [6].

What You Gain

Beyond fixing deprecation warnings, upgrading to 3.13 gives you real benefits:
Performance. Python 3.13 includes the incremental garbage collector (shorter GC pauses), faster  isinstance()  checks, and continued specialization from the adaptive interpreter. Typical web workloads see 5-15% speedup from 3.10 → 3.13 [4].
Better error messages. Syntax errors now suggest corrections ("Did you mean  for ?"). TypeErrors show which argument was wrong. Exception groups (3.11+) allow parallel exception handling.
Cleaner code. The  X | None  syntax is more readable than  Optional[X] . Built-in generics ( list[str] ) are clearer than  List[str] . F-strings are faster and more readable than  %  formatting.
Security. Active security patches. Python 3.10 stops receiving them in October 2026.

Scaling Across Your Fleet

Fleet-Scale Upgrade Pipeline, Pilot to Batch to Results


Non-Interactive Mode

atx custom def exec \
--transformation-name "AWS/python-version-upgrade" \
--code-repository-path /path/to/service \
--build-command "pytest tests/ -v" \
--configuration "additionalPlanContext=Target Python 3.13" \
--non-interactive --trust-all-tools

Batch Script for Multiple Services

#!/bin/bash
# upgrade-python-fleet.sh

SERVICES=(
"/path/to/order-service"
"/path/to/user-service"
"/path/to/billing-service"
"/path/to/notification-service"
)

for service in "${SERVICES[@]}"; do
echo "=== Upgrading: $(basename $service) ==="
atx custom def exec \
-n "AWS/python-version-upgrade" \
-p "$service" \
-c "pytest" \
--configuration "additionalPlanContext=Target Python 3.13" \
-x -t
echo "✅ Done: $(basename $service)"
done

Enterprise Scale (50+ services)

python3 utilities/invoke-api.py \
--endpoint "$API_ENDPOINT" \
--path "/jobs/batch" \
--data '{
"batchName": "python-3.13-upgrade-q3-2026",
"jobs": [
{"source": "https://github.com/your-org/order-service", "command": "atx custom def exec -n AWS/python-version-upgrade -p /source/order-service -c pytest --configuration \"additionalPlanContext=Target Python 3.13\" -x -t"},
{"source": "https://github.com/your-org/user-service", "command": "atx custom def exec -n AWS/python-version-upgrade -p /source/user-service -c pytest --configuration \"additionalPlanContext=Target Python 3.13\" -x -t"}
]
}'
128 concurrent jobs. Your entire Python fleet upgraded in parallel.
New since this was written: Beyond one-off batch runs, AWS Transform – continuous modernization turns fleet upgrades into an ongoing practice. Connect your GitHub/GitLab/Bitbucket org ( atx ct source add ), discover repositories ( atx ct discovery scan ), scan for outdated runtimes ( atx ct analysis run ), and open remediation PRs at scale ( atx ct remediation create ) — on a recurring schedule via managed infrastructure or your own EC2/Batch stack. So instead of scrambling before each EOL date, your portfolio is monitored continuously.

The Honest Caveats

ATX handled this cleanly because the patterns were standard. A few things it won't auto-fix:
C extensions. If your project uses packages with C bindings compiled for 3.10, you'll need to verify wheel availability for 3.13. Most popular packages (numpy, pandas, etc.) publish 3.13 wheels, but internal or niche packages may not.
Runtime behavior changes.  asyncio.get_event_loop()  behaves differently in 3.12+. If your code relies on the implicit event loop in non-async contexts, ATX may flag it but the fix depends on your architecture.
CI/CD configuration. ATX updates  pyproject.toml  but may not update your GitHub Actions matrix, Dockerfile  FROM  image, or Lambda runtime setting. Check those separately.
For this demo (a standard FastAPI service with no C extensions or complex async patterns), ATX handled everything automatically.

The Timeline

Date
Event
October 2021
Python 3.10 released
October 2025
Python 3.9 EOL (no more patches)
October 2026
Python 3.10 EOL
October 2027
Python 3.11 EOL
You have ~4 months. The good news: you can start with a single service today, validate the transformation works for your codebase, and scale from there. The tooling is ready, and the only variable is when you start.

Getting Started

# Install ATX (requires Node.js 22+)
curl -fsSL https://transform-cli.awsstatic.com/install.sh | bash

# Authenticate (configure AWS credentials)
aws configure # or set AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_REGION

# Run against your Python service
cd your-python-service
atx

# Type: Upgrade this Python project to Python 3.13...
Or non-interactively:
atx custom def exec \
--transformation-name "AWS/python-version-upgrade" \
--code-repository-path . \
--build-command "pytest" \
--configuration "additionalPlanContext=Target Python 3.13" \
--non-interactive --trust-all-tools
The  AWS/python-version-upgrade  transformation is pre-built and continuously refined by AWS. You don't need to create anything. Just point it at your repo.



References

[1] Python Software Foundation, "Python 3.10 Release Schedule," PEP 619.  https://peps.python.org/pep-0619/ 
[2] CPython Security Advisories, 2025.  https://www.python.org/downloads/security/ 
[3] PyPI Download Statistics, pypistats.org, 2026.  https://pypistats.org/ 
[4] "What's New in Python 3.13," Python documentation.  https://docs.python.org/3.13/whatsnew/3.13.html 
[5] AWS, "AWS Transform Custom documentation."  https://docs.aws.amazon.com/transform/latest/userguide/custom.html 
[6] AWS, "AWS Transform pricing."  https://aws.amazon.com/transform/pricing/ 


Disclaimer: Opinions expressed are personal and do not represent the official position of any organization. All claims about ATX capabilities are verified against the  official documentation .
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article