]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Avoid unwanted behavior change in shlex.quote (see #9723).
authorÉric Araujo <merwok@netwok.org>
Tue, 9 Aug 2011 21:18:06 +0000 (23:18 +0200)
committerÉric Araujo <merwok@netwok.org>
Tue, 9 Aug 2011 21:18:06 +0000 (23:18 +0200)
commit7fc0394a12d4bb5632424bfdfd4bb35590dec2e5
treead4b890d2fe33e31c5a85b9476fe317311227f37
parent18205baf251495b5a54b08c1f9b0e1763eb27aa1
parentef1e94a848533f2e7dbb2ed7a8b2de50e97e4b7f
Avoid unwanted behavior change in shlex.quote (see #9723).

I simplified the quote code to use a regex instead of a loop+test when I
moved pipes.quote to shlex in 5966eeb0457d; Ezio Melotti pointed out
that my regex contained redundant parts (now removed) and allowed
non-ASCII characters (now disallowed).

I think common UNIX shells don’t quote non-ASCII characters, but there’s
no harm in doing so.  We’ll see if users request a change.
Lib/shlex.py
Lib/test/test_shlex.py