Skip to content

Do not require on pkg_resources as it drastically increases import time. #5676

Closed
@marscher

Description

@marscher

Is your feature request related to a problem? Please describe.
Most of the import time of xarray is wasted by importing pkg_resources. As far as I could see, the module is used to set the version number of xarray. So importing xarray takes like 0.275s (old machine) and of this 0.17s are just spent in importing pkg_resources.

Describe the solution you'd like
There are better approaches to set the version number than to use this heavy weight module. For instance setuptools_scm.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
xarray-version 0.19.0

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