Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

2to3 dependency support was removed in python 3.13 breaking package functionality

Open
#124 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
tooling

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

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dropbox/pyannotate

All issues in dropbox/pyannotate

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.