Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When parsing command lines, use
shlex(..., posix=True)
, even on windows platforms, since non-POSIX mode does not handle escape characters and quoting like a shell would. This improves cross-platform configurations without hacks or esoteric quoting.To make this transition easier, on Windows, the backslash path separator will not treated as an escape character unless it preceeds a quote, whitespace, or another backslash chracter. This allows paths to mostly be written in single or double backslash style.
Note that double-backslash will no longer be escaped to a single backslash in substitutions, instead the double backslash will be consumed as part of command splitting, on either posix or windows platforms.
In some instances superfluous double or single quote characters may be stripped from arg arrays in ways that do not occur in the default windows
cmd.exe
shell.TODO
Ensure this does not regress #2732 and other recent fixes around the substitution parser.
Thanks for contribution
Please, make sure you address all the checklists (for details on how see
development documentation)!
tox -e fix
)docs/changelog
folder