We Have Nearly One Million Lines of Python 2 Code in Production – and Now?
summary
A legacy German CMS called union.cms with nearly one million lines of Python 2 code is migrated to Python 3 using a five‑step plan: prep with tests (88% coverage), surgically remove dead code, update/replace dependencies, modernize source with python-modernize + six (avoid future), run pyland checks to catch Python-3-only semantic issues, fix tests, and convert the ZODB/pickle data in a weekend. Work happens across 19 monthly iterations, ~1.5 years; deployment succeeds after staged testing and a final coordinated removal of Python‑2 compatibility (pyupgrade + cleanup).
AI-written summary · about
