Skip to content

Slow import due to __version__ #170

@leonardgerardatomicmachinescom

Description

If the version is not embedded during wheel/distribution, it would be better to stop putting it there (or do it lazily).

importing importlib.metadata and calling it takes about 0.4s one the (slow) computer I am using. proto is meant to be lightweight and fast, this import takes more time than anything else when calling import betterproto

__version__ = metadata.version("betterproto2")

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