Skip to content

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

@error-try-again

Description

@error-try-again

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'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions