Arve Knudsen <arve.knud...@gmail.com> added the comment:

Would you mind defining why the 2.7 behaviour is correct in this particular
case? The list2cmdline behaviour discussed in issue 8972 has to do with
shell commandlines; in this case, in my eyes any shell invocation (in order
to run a .bat I guess) is only an implementation detail. Is the 2.7
behaviour correct since the Win32 function CreateProcess happens to start a
shell to run .bat files, which in turn interprets the arguments? I'm
guessing this is what happens...

There certainly can't be any universal definition in subprocess saying that
arguments to shell scripts shall be interpreted by the shell; when trying
now *on Linux* to launch a corresponding .sh script through subprocess,
arguments are passed through verbatim. I should like to see subprocess
maintain (or keep maintaining, rather) a uniform interface, so that
arguments are not interpreted so long as the 'shell' argument equals False.

I understand completely that list2cmdline should implement C library
behaviour, and not protect arguments from the shell, but that doesn't mean
it should automatically define the behaviour of other functions such as
Popen and call.

Arve

On Mon, Feb 7, 2011 at 4:38 PM, R. David Murray <rep...@bugs.python.org>wrote:

>
> R. David Murray <rdmur...@bitdance.com> added the comment:
>
> Well, it's not really a duplicate, but rather invalid, since the 2.7
> behavior is more correct than the 2.6 behavior.  Not that it matters all
> that much what particular resolution is attached to a bug.
>
> Arve: It is unfortunate that the bug fix in issue 8972 caused a regression
> for you, but at this point what is done is done.
>
> Also, for future reference, when attaching files to an issue please attach
> text files only.  They are much easier to review.
>
> ----------
> nosy: +r.david.murray
> resolution: duplicate -> invalid
> stage:  -> committed/rejected
> superseder:  -> subprocess.list2cmdline doesn't quote the & character
>
> _______________________________________
> Python tracker <rep...@bugs.python.org>
> <http://bugs.python.org/issue11139>
> _______________________________________
>

----------
Added file: http://bugs.python.org/file20712/unnamed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11139>
_______________________________________
Would you mind defining why the 2.7 behaviour is correct in this particular 
case? The list2cmdline behaviour discussed in issue 8972 has to do with shell 
commandlines; in this case, in my eyes any shell invocation (in order to run a 
.bat I guess) is only an implementation detail. Is the 2.7 behaviour correct 
since the Win32 function CreateProcess happens to start a shell to run .bat 
files, which in turn interprets the arguments? I&#39;m guessing this is what 
happens...<div>
<br></div><div>There certainly can&#39;t be any universal definition in 
subprocess saying that arguments to shell scripts shall be interpreted by the 
shell; when trying now *on Linux* to launch a corresponding .sh script through 
subprocess, arguments are passed through verbatim. I should like to see 
subprocess maintain (or keep maintaining, rather) a uniform interface, so that 
arguments are not interpreted so long as the &#39;shell&#39; argument equals 
False.</div>
<div><br></div><div>I understand completely that list2cmdline should implement 
C library behaviour, and not protect arguments from the shell, but that 
doesn&#39;t mean it should automatically define the behaviour of other 
functions such as Popen and call.</div>
<div><br></div><div>Arve<br><br><div class="gmail_quote">On Mon, Feb 7, 2011 at 
4:38 PM, R. David Murray <span dir="ltr">&lt;<a 
href="mailto:rep...@bugs.python.org";>rep...@bugs.python.org</a>&gt;</span> 
wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
R. David Murray &lt;<a 
href="mailto:rdmur...@bitdance.com";>rdmur...@bitdance.com</a>&gt; added the 
comment:<br>
<br>
Well, it&#39;s not really a duplicate, but rather invalid, since the 2.7 
behavior is more correct than the 2.6 behavior.  Not that it matters all that 
much what particular resolution is attached to a bug.<br>
<br>
Arve: It is unfortunate that the bug fix in issue 8972 caused a regression for 
you, but at this point what is done is done.<br>
<br>
Also, for future reference, when attaching files to an issue please attach text 
files only.  They are much easier to review.<br>
<br>
----------<br>
nosy: +r.david.murray<br>
resolution: duplicate -&gt; invalid<br>
stage:  -&gt; committed/rejected<br>
superseder:  -&gt; subprocess.list2cmdline doesn&#39;t quote the &amp; 
character<br>
<div><div></div><div class="h5"><br>
_______________________________________<br>
Python tracker &lt;<a 
href="mailto:rep...@bugs.python.org";>rep...@bugs.python.org</a>&gt;<br>
&lt;<a href="http://bugs.python.org/issue11139"; 
target="_blank">http://bugs.python.org/issue11139</a>&gt;<br>
_______________________________________<br>
</div></div></blockquote></div><br></div>
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to