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
scrubbers rejects PathLike values and crashes on Windows paths #148
ScrubberSpec only accepts tuple[str | re.Pattern[str], str] and compiles every str pattern directly with re.compile(pat). Callers scrubbing pytest tmp_path directories cannot pass (tmp_path, "<TMP>") directly as an os.PathLike[str], and passing (str(tmp_path), "<TMP>") crashes on Windows paths (C:\Users\...) with re.PatternError and misinterprets regex metacharacters (such as [case0] or c++ directory segments) on POSIX.
Reproduction
Pass a PureWindowsPath string (or pathlib.Path) to serialize_vt_snapshot(..., scrubbers=...):
ScrubberSpec accepts os.PathLike[str] values ((tmp_path, "<TMP>")) and escapes literal path metacharacters and separators cleanly across POSIX and Windows without raising re.PatternError.
Actual
re.compile() treats \U in the Windows path string as an incomplete Unicode escape and raises re.PatternError (while passing win_tmp directly fails type-checking and raises TypeError in _compile_scrubbers()):
re.PatternError: incomplete escape \U at position 2
PR #150 now targets #149’s row-preserving renderer. A literal file path preserved a wrapped URI across both rows of a 10×2 screen, with the cursor at (1, 8). An explicit URI regex replaced it. Cropping the prefix out of view preserved the same literal-match behavior. PR #150 · PR #149
Activity
tony commentedon Dec 3, 2026
PR #150 now targets #149’s row-preserving renderer. A literal file path preserved a wrapped URI across both rows of a 10×2 screen, with the cursor at (1, 8). An explicit URI regex replaced it. Cropping the prefix out of view preserved the same literal-match behavior. PR #150 · PR #149