Journey to migrate python2 projects to 3
summary
Migrating avocado-vt and tp-libvirt updates nearly 650 files changed while keeping production running; work follows a three‑phase coexistence strategy with a branch that validates commits on both Python 2 and 3. Automation uses sixer and 2to3 plus futurize/modernize to apply fixes, CI and virtualenv + CI validate both interpreters, and manual patches handle bytes vs text, integer division, moved/removed stdlib modules, implicit relative imports and deprecated APIs. Continuous small PRs lower risk and rollback is possible.
AI-written summary · about
chapters (11)
- 0:00Start
- 0:54Project Overview
- 1:37Motivation
- 2:42Migration strategy
- 3:25Specific Strategies
- 4:27Use Continuous Integration
- 8:45Modernize
- 9:29Common technique issues
- 9:47Essential syntax differences
- 12:19Something is gone(2/2)
- 20:35Useful Resources
related talks
27mHow We Migrated 3.8 Million Lines of Python 2 Without Interrupting Deve...
45mWriting Python 2/3 compatible code
02h 38mMigration from Python 2 to 3
44mHow to Build a Plan to Migrate to Python 3
26mPython 2 is dead! Drag your old code into the modern age
41mPorting a Project from Python 2 to 3
26mPython 2 to 3: How to Upgrade and What Features to Start Using
39mMoving to pyproject and tox
