Skip to content

utils.minversion should use importlib.metadata to get version info #11705

@mhvk

Description

@mhvk

In #11700, I needed to do a version check on jplephem, and thought I'd use utils.minversion. However, it only works if the package defines a __version__ attribute. @saimn pointed out that one can get the version more programmatically with importlib.metadata.version - it seems we should be using that internally inside minversion (perhaps just as backup if no __version__ exists, or maybe even just by default).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions