2to3 dependency support was removed in python 3.13 breaking package functionality
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
Start at pyannotate_tools/annotations/main.py, where the traceback shows the lib2to3 import failing under Python 3.13. Check how the annotation command uses StdoutRefactoringTool and identify the supported replacement or compatibility approach. Done means the shown pyannotate command runs on Python 3.13 without the ModuleNotFoundError while retaining its annotation behavior.
Written by the indexing model from the issue text.
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
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 <module>
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 <module>
from lib2to3.main import StdoutRefactoringTool
ModuleNotFoundError: No module named 'lib2to3'
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 59
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dropbox/pyannotate
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
dropbox/pyannotate#123 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
dropbox/pyannotate#115 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
dropbox/pyannotate#109 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
dropbox/pyannotate#103 · 6 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
dropbox/pyannotate#102 ·
All issues in dropbox/pyannotate
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
BasedHardware/omi#20271 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
openai/openai-cookbook#3153 ·
Maintainers usually reply within 1 day
-
cvss-severity:high devguard l3montree-cybersecurity/devguard/devguard pkg:golang/github.com/l3montree-dev/devguard risk:low state:open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
l3montree-dev/devguard#3146 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug confirmed issue
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
open-webui/open-webui#31849 · 2 comments ·
Maintainers usually reply within 1 day