Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

compare_scan_accuracy: editable-dependency file:// URL resolves to "C:\C:\..." on Windows

オープン 初心者向け
#485 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 4 日以内に返信

@mohgupta-ship-it がすでに取り組んでいます。

2026年9月6日 から。

  • #486 @SanHsien による — マージされずにクローズ
  • #490 @mohgupta-ship-it による — オープン

評価

難易度
1/5
見積もり時間
1時間未満
初心者へのやさしさ
90/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
tooling

調査の方向性

scripts/compare_scan_accuracy.py の _RUNTIME_IDENTITY_PROBE から始め、解析された file:// パスが resolve(strict=True) の前にどのように変換されるかを確認します。Windows で tests/unit/test_compare_scan_accuracy.py::test_runtime_probe_hashes_installed_and_editable_dependency_bytes を実行します。editable 依存関係のテストがドライブ文字の二重化エラーなしで通り、ruff のチェックも引き続きクリーンであれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

The runtime identity probe in scripts/compare_scan_accuracy.py converts an editable dependency's direct_url.json file:// URL to a local path with Path(urllib.parse.unquote(parsed.path)). On Windows that produces a doubled drive letter and the subsequent resolve(strict=True) raises.

Where

scripts/compare_scan_accuracy.py, inside _RUNTIME_IDENTITY_PROBE:

editable_root = Path(urllib.parse.unquote(parsed.path)).resolve(strict=True)

Why it breaks

A Windows file:// URL is file:///C:/Users/.../pkg, so urlsplit(...).path is /C:/Users/.../pkg — with a leading slash. Path() reads that slash as a root, so the result is C:\C:\Users\...\pkg:

>>> from urllib.parse import urlsplit, unquote
>>> from pathlib import Path
>>> Path(unquote(urlsplit("file:///C:/Users/me/pkg").path))
WindowsPath('/C:/Users/me/pkg')     # -> resolves against the cwd drive as C:\C:\Users\me\pkg

resolve(strict=True) then raises:

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect:
'C:\C:\Users\...\editable-dependency'

On POSIX the two are identical (/tmp/pkg either way), which is why CI does not see it.

Reproduction

On Windows, with the repo installed as an editable dependency:

uv run pytest tests/unit/test_compare_scan_accuracy.py::test_runtime_probe_hashes_installed_and_editable_dependency_bytes

Fails with the WinError 123 above. This is your existing test, unmodified — it already covers the bug, it just never runs on a Windows host in CI.

Suggested fix

urllib.request.url2pathname is the stdlib function for this conversion and is correct on both platforms:

editable_root = Path(urllib.request.url2pathname(parsed.path)).resolve(strict=True)

Verified on Windows 11 / Python 3.13: the test above goes from failing to passing with that one-line change, and ruff check / ruff format --check stay clean. Happy to open a PR.

Environment

  • Windows 11, native (not WSL)
  • Python 3.13.14, uv 0.12.8
  • SkillSpector 2.11.0 (7805bb9)
主要言語
Python
スター
20.2k
フォーク
1.8k
平均マージ
4日 14時間
マージ済み PR(30日)
120

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/SkillSpector のほかの issue

NVIDIA/SkillSpector の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。