2to3 dependency support was removed in python 3.13 breaking package functionality
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
Using pyannotate 1.2.0, Python 3.13.1 (main, Dec 4 2024, 08:54:14) [GCC 11.4.0] on linux
- see the maintainers deprecation notice [https://docs.python.org/3.12/library/2to3.html](url)
Code example:
```
from pyannotate_runtime import collect_types
collect_types.init_types_collection()
if __name__ == "__main__":
collect_types.start()
runner = Runner()
asyncio.run(runner.run())
collect_types.stop()
collect_types.dump_stats("example-types.dump")
```
The error:
```
(venv) void@null » pyannotate --type-info example-types.dump --py3 -w main.py
Traceback (most recent call last):
File "/home/void/my_project/venv/bin/pyannotate", line 5, in
from pyannotate_tools.annotations.__main__ import main
File "/home/void/my_project/venv/lib/python3.13/site-packages/pyannotate_tools/annotations/__main__.py", line 9, in
from lib2to3.main import StdoutRefactoringTool
ModuleNotFoundError: No module named 'lib2to3'
```
Contributor guide
Assessment
This issue has not been assessed yet.