Skip to content

Python binding on PyPI doesn't have type hints #8186

@FoxRLY

Description

@FoxRLY

libtorrent version

2.0.11

Python version

3.13

Problem

Tried downloading and using libtorrent binding from PyPI but pyright lsp server cannot do type hints. Probably because package consists of one .so file and nothing more

Steps to reproduce

  1. Create new python project with python -m venv ./.venv
  2. Make project active with source .venv/bin/activate
  3. Add libtorrent package with pip add libtorrent
  4. Create new python file and try importing libtorrent

Expected: type hints help with development
Actual: no type hints

Workaround

Manually add __init.pyi from repository to package in .venv/lib/python3.13/site-packages/libtorrent and .venv/lib64/python3.13/site-packages/libtorrent

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions