[issue7839] Popen should raise ValueError if pass a string when shell=False or a list when shell=True
R. David Murray
report at bugs.python.org
Sun Apr 1 16:40:49 CEST 2012
R. David Murray <rdmurray at bitdance.com> added the comment:
Which just goes to show that using Popen correctly is not obvious, I suppose.
Given that adding these errors *would* break backward compatibility, there would have to be a deprecation if it was done.
Personally I don't see the point in adding new class methods (complicating the interface) unless we are going to deprecate the current methods...in which case why not just deprecate the incorrect way of calling it? (Note: I say incorrect because the 'call a different shell' variant *doesn't work* unless you write a custom shell that ignores '-c', and as Chris points out there's no functionality *gained* by the windows variation, and there is confusion introduced as to exactly what is going on).
So, if we aren't going to deprecate the "incorrect" calls, I vote for just closing this issue as "won't fix".
(I suppose that a third alternative exists: make the "incorrect" calls actually do something useful while preserving backward compatibility with the existing behavior. That may be difficult, especially doing it in a way that logically consistent cross-platform.)
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list