Standard library removal
Python 3.13 lib2to3 removed parser APIs gone official
A code generation/refactoring tool breaks because parser APIs are gone.
Agent Quick Fix
Repair against the current Python 3.13 / lib2to3 contract, then keep the change narrow and source-backed.
Product: Python 3.13 / lib2to3
Current-contract area: Removed stdlib module `lib2to3` reached through an integration path
Likely root cause: A code generation/refactoring tool breaks because parser APIs are gone.
Repair direction: Verifier checks the maintained replacement package/API and behavior, including edge cases. Verify functional parity on representative inputs, not only a replacement import.
Symptom
A code generation/refactoring tool breaks because parser APIs are gone.
Why This Happens
The import is locally valid for older runtimes and may have no project dependency declaration; only the target runtime's current stdlib contents resolve it.
Common Wrong Fixes
- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.
Codex Search Keywords
These are the search terms observed in a neutral Codex validation run for this failure shape.
Python 3.13 lib2to3 removed parser APIs gone official
site:docs.python.org/3.13 lib2to3 removed Python 3.13
https://docs.python.org/3.12/library/2to3.html
'lib2to3' in https://docs.python.org/3.13/whatsnew/3.13.html
https://docs.python.org/3.13/whatsnew/3.13.html