Skip to content

fix(config): preserve Windows UNC paths - #4060

Merged
gaborbernat merged 5 commits into
tox-dev:mainfrom
MohammedAlkindi:fix/win32-unc-path-backslash
Sep 8, 2026
Merged

gaborbernat merged 5 commits into
tox-dev:mainfrom
MohammedAlkindi:fix/win32-unc-path-backslash

Conversation

@MohammedAlkindi

@MohammedAlkindi MohammedAlkindi commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Windows commands now preserve the leading backslashes in UNC and extended-length paths, including quoted paths and --source=\\server\share option values.

Track quotes while preparing arguments for shlex. Preserve single-quoted text and keep existing escapes for interior or bare backslash pairs. The reference docs include a quoted UNC path example and explain the escaping rules.

Respect quotes when identifying UNC prefixes, including option values.
Keep single-quoted paths literal and preserve existing backslash escapes.
@gaborbernat gaborbernat changed the title 🐛 fix(config): keep the leading pair of a win32 UNC path fix(config): preserve Windows UNC paths Sep 8, 2026
@gaborbernat
gaborbernat enabled auto-merge (squash) September 8, 2026 16:13
@gaborbernat
gaborbernat merged commit dc318dd into tox-dev:main Sep 8, 2026
30 checks passed
gaborbernat added a commit to tox-dev/tox-uv that referenced this pull request Sep 15, 2026
tox 4.61.3 (tox-dev/tox#4060) treats single-quoted command text as literal
on Windows, so python -c 'print("{env_python}")' now hands Python a
"C:\Users..." literal and fails with a unicodeescape SyntaxError. Pass the
path as a double-quoted argument instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants