Please consider moving away from importlib.metadata for version identification
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 1.4k
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 14
Description
What is your issue?
I know there is alot of churn around this, but with some recent refactors we've reintroduced some version checks on xarray (we'll have to remove this because of this).
But i'm looking at a my site-packages directory and i'm noticing that xarray appears twice
xarray-2025.4.0.dist-info/
xarray-2025.9.1.dist-info/
xarray
this is really not due to you all. I've noticed that conda/mamba recently has been leaving many files behind, but it caused me to debug for a while.
https://github.com/pydata/xarray/pull/10771
For me, miniver has been good.
But I just wanted to flag that conda/mamba may be giving your users inaccurate version information
Ultimately, I've just found importlib.metadata to be misleading on the actual code being run. Yes it gives you a picture of the metadata, but that isn't what is actually running given the user's path and all.
I know this change was from 2 years ago.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the current xarray version checks and the changes discussed in pull request #10771, then trace how importlib.metadata reports the installed version. Define an agreed replacement that reflects the code selected by the user's path; done means the approach is implemented and its version behavior is verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100