mirror of
https://github.com/python/cpython.git
synced 2025-11-03 11:23:31 +00:00
Add shlex.quote function, to escape filenames and command lines (#9723).
This function used to live as pipes.quote, where it was undocumented but used anyway. (An alias still exists for backward compatibility.) The tests have been moved as is, but the code of the function was changed to use a regex instead of a loop with string comparisons (at Ian Bicking’s suggestion). I’m terrible at regexes, so any feedback is welcome.
This commit is contained in:
parent
fcdaaa9011
commit
9bce311ea4
7 changed files with 66 additions and 42 deletions
|
|
@ -237,6 +237,9 @@ Core and Builtins
|
|||
Library
|
||||
-------
|
||||
|
||||
- Issue #9723: Add shlex.quote functions, to escape filenames and command
|
||||
lines.
|
||||
|
||||
- Issue #12607: In subprocess, fix issue where if stdin, stdout or stderr is
|
||||
given as a low fd, it gets overwritten.
|
||||
|
||||
|
|
@ -6674,4 +6677,4 @@ Docs
|
|||
----
|
||||
|
||||
|
||||
**(For information about older versions, consult the HISTORY file.)**
|
||||
**(For information about older versions, consult the HISTORY file.)**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue