`PackagePath` does not support Windows paths
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
Start in importlib_metadata/init.py around the referenced PackagePath implementation and compare its handling of forward- and backslash-separated paths with the RECORD specification. Add coverage for Windows-style paths and verify that the resulting .name is consistent across path separators.
Written by the indexing model from the issue text.
Description
Currently, importlib.metadata.files assumes that path are Unix-style with forward slashes, while the spec allows Windows-style backwards slashes too. This causes e.g. the .name on items to be inconsistent between platforms (https://github.com/astral-sh/uv/issues/14446).
From https://packaging.python.org/en/latest/specifications/recording-installed-packages/#the-record-file
The path may be either absolute, or relative to the directory containing the .dist-info directory (commonly, the site-packages directory). On Windows, directories may be separated either by forward- or backslashes (/ or ).
- Dominant language
- Python
- Stars
- 142
- Forks
- 97
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
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.
More from python/importlib_metadata
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
python/importlib_metadata#535 ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
python/importlib_metadata#526 · 6 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
python/importlib_metadata#525 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
python/importlib_metadata#540 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
python/importlib_metadata#534 · 1 comment ·
All issues in python/importlib_metadata
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100