Migrate a Python 2 codebase to Python 3.12+ — `2to3` baseline, the parts the tool misses (bytes/str semantics, dict ordering, divisions, exception syntax), encoding handling, and the dependency upgrades. Use only when stuck on legacy Py2 — Python 2 has been EOL since 2020 but lives on in regulated/government/embedded.