PythonAsia 2026

PythonAsia 2026

From Pydantic v1 to v2: A Deep-Dive Migration for Real Production Systems
2026-03-21 , Pardo Hall (Secondary Hall)

Pydantic v2 is fast, elegant, and thoughtfully redesigned — but migrating a real production system isn’t always as simple as upgrading a dependency. In our project, the v1 → v2 journey started with excitement and quickly turned into detective work: broken validators, unexpected serialization differences, and a few “why is this failing?” moments.
In this talk, I’ll walk you through how we navigated the migration, what we refactored, what we kept, and which patterns saved us hours of debugging. If you’ve been postponing your migration or don’t know where to begin, this session will give you a clear, practical path forward.


This talk shares a hands-on, experience-based walkthrough of upgrading a production codebase from Pydantic v1 to v2. We’ll explore why the Pydantic team rewrote the engine, how pydantic-core changes your mental model of validation, and how v2 encourages explicit, functional validators.
I’ll tell the story of how we discovered hidden v1 assumptions in our models, dealt with root_validator deprecation, rewrote custom types, and uncovered performance wins after the move. Along the way, you’ll see real migration patterns, failure points, and before/after code.
Attendees will leave with a battle-tested checklist, practical tips, and confidence to migrate their own systems smoothly.


Category: Core Python/Advanced Language Features Audience Level: Intermediate

Hemangi is a passionate Python developer and community contributor. She enjoys simplifying complex topics like Pydantic, FastAPI, and testing, and has spoken at events such as GIDS, PyCon Italy, and PgCon Hong Kong. She believes in building strong developer communities and helping others grow through mentoring and knowledge-sharing.