This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients BreamoreBoy, barry, brett.cannon, christopher.hogan, dstufft, eric.araujo, jaraco, mgiuca, ncoghlan, r.david.murray, steve.dower, tarek, zach.ware
Date 2015-08-20.16:42:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440088961.17.0.0796746378588.issue8987@psf.upfronthosting.co.za>
In-reply-to
Content
The problem is I can easily find plenty of cases where it won't work.

My biggest concern is that list2cmdline will require already-quoted arguments, which is going to break anyone who's already worked around distutils failing to do so (which makes it really difficult to justify fixing 2.7 and 3.4, and soon 3.5 unless we get it into 3.5.0). The escaping it applies for '\"' also does not take into account someone who has correctly escaped their own argument.

Particularly for distutils, we look up tools by simple name and use PATHEXT, so we may find someone's "link.bat", which then needs very different quoting from the actual "link.exe" (this one is probably unsolvable, unfortunately).

The solution isn't as simple as calling an existing function. It's probably actually as complicated as requiring callers to specify whether strings are quoted or not, and then switching between quoting modes based on what type of program (ie. EXE vs BAT) is being launched. list2cmdline is false hope here, IMO, as it just makes it harder for people to work around.
History
Date User Action Args
2015-08-20 16:42:41steve.dowersetrecipients: + steve.dower, barry, brett.cannon, jaraco, ncoghlan, tarek, eric.araujo, mgiuca, r.david.murray, BreamoreBoy, zach.ware, dstufft, christopher.hogan
2015-08-20 16:42:41steve.dowersetmessageid: <1440088961.17.0.0796746378588.issue8987@psf.upfronthosting.co.za>
2015-08-20 16:42:41steve.dowerlinkissue8987 messages
2015-08-20 16:42:40steve.dowercreate