Skip to content

Dependency checking with importlib.metadata #364

@davidhassell

Description

@davidhassell

#361 got rid of dependency version checking in init.py.

However, it could still be done cheaply with the importlib.metadata module (as pointed by @sadielbartholomew: #362 (comment)):

>>> from importlib import metadata
>>> metadata.version("cftime")
'1.6.4'
>>> metadata.version("netCDF4")
'1.7.2'
>>> metadata.version("dask")
'2025.7.0'

So, do we want to do this?

Related, is making sure that our libraries return nice things in this manner.

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