Skip to content

Use a src layout instead of a flat layout #4797

@harshil21

Description

@harshil21

What kind of feature are you missing? Where do you notice a shortcoming of PTB?

The python packaging guide recommends that libraries which are meant to be importable (that's us) should use a src layout. The pros of using it is listed here - https://packaging.python.org/en/latest/discussions/src-layout-vs-flat-layout/

Describe the solution you'd like

The telegram folder will now be in src/telegram.

Describe alternatives you've considered

Not conforming to python packaging standards

Additional context

uv also initializes a new project with src layout by default for libraries, see https://docs.astral.sh/uv/concepts/projects/init/#libraries

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions