You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test_binary_captures_skip_existing_entries fails on Windows: readlink() returns a \\?\ extended-length path #4435
tests/test_ingest_url_type.py::test_binary_captures_skip_existing_entries (added in 750b5642, #4393)
fails on Windows for three parameters: dangling_link-False, dangling_link-True, live_link-True
(3 failed, 37 passed on a clean v0.9.89 checkout, Python 3.13.13, Windows 11).
The fix itself works: all earlier assertions pass (the new capture gets a free numbered name, its bytes are
right, the existing symlink is untouched). Only the final symlink check fails:
assert occupied.is_symlink() and occupied.readlink() == sentinel
AssertionError: assert (True and WindowsPath('//?/C:/Users/.../sentinel') == WindowsPath('C:/Users/.../sentinel'))
Cause
On Windows, Path.readlink() returns the target in extended-length form (\\?\C:\..., or \\?\UNC\server\share\... for a network path), while sentinel is a plain C:\... path.
Hosts that cannot create symlinks skip these parameters, so the failure only appears where symlinks work.
Suggested fix
Strip the extended-length prefix before comparing. os.path.samefile is not an option here (the dangling_link target does not exist), and a bare removeprefix("\\\\?\\") turns the UNC form into UNC\server\share\..., so that case is handled separately:
Already fixed on v8: commit e7772b2 (test(ingest): compare the symlink target against what readlink returned before (#4435)) changed the assertion to compare occupied.readlink() against a link_target captured via readlink() before the ingest runs, rather than against the plain sentinel path, which sidesteps the extended length prefix mismatch entirely. Landed via #4442 (closed, not auto linked since it was cherry picked rather than merged through the PR button, same pattern as #2780/#2779 and #4413/#4414). Might be worth closing this one too.
Fixed on v8 by e7772b2: the test now compares the link against the target readlink() returned before the capture, so the Windows \\?\ extended-length prefix no longer breaks the check. It was cherry-picked, so the issue didn't close automatically. Safe to close.
This looks fixed on the v8 branch by e7772b2d (test(ingest): compare the symlink target against what readlink returned before (#4435)). Could a maintainer confirm and close?
Retested on clean upstream tag v0.9.109 on Windows 11 with Python 3.13.13, the same platform and Python version as in the original report. All 42 tests in tests/test_ingest_url_type.py passed, including the three previously failing symlink cases; none of those cases was skipped.
The change in e7772b2d resolves the reported test failure. Thanks for the fix and for following up!
Activity
github-actions commentedon Oct 13, 2026
Thanks for opening this issue, @sub4biz. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
test(ingest): compare the symlink target against what readlink return…
ayushcodes10 commentedon Oct 16, 2026
Already fixed on v8: commit e7772b2 (
test(ingest): compare the symlink target against what readlink returned before (#4435)) changed the assertion to compareoccupied.readlink()against alink_targetcaptured viareadlink()before the ingest runs, rather than against the plainsentinelpath, which sidesteps the extended length prefix mismatch entirely. Landed via #4442 (closed, not auto linked since it was cherry picked rather than merged through the PR button, same pattern as #2780/#2779 and #4413/#4414). Might be worth closing this one too.omsenjalia commentedon Oct 18, 2026
Fixed on v8 by e7772b2: the test now compares the link against the target
readlink()returned before the capture, so the Windows\\?\extended-length prefix no longer breaks the check. It was cherry-picked, so the issue didn't close automatically. Safe to close.omsenjalia commentedon Oct 18, 2026
This looks fixed on the
v8branch by e7772b2d (test(ingest): compare the symlink target against what readlink returned before (#4435)). Could a maintainer confirm and close?sub4biz commentedon Nov 15, 2026
Retested on clean upstream tag v0.9.109 on Windows 11 with Python 3.13.13, the same platform and Python version as in the original report. All 42 tests in
tests/test_ingest_url_type.pypassed, including the three previously failing symlink cases; none of those cases was skipped.The change in e7772b2d resolves the reported test failure. Thanks for the fix and for following up!