[issue8987] Distutils doesn't quote Windows command lines properly

2021-02-03 Thread Steve Dower
Steve Dower added the comment: Distutils is now deprecated (see PEP 632) and all tagged issues are being closed. From now until removal, only release blocking issues will be considered for distutils. If this issue does not relate to distutils, please remove the component and reopen it. If

[issue8987] Distutils doesn't quote Windows command lines properly

2020-01-24 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8987] Distutils doesn't quote Windows command lines properly

2018-11-19 Thread Steve Dower
Steve Dower added the comment: There's been progress in terms of setuptools eventually adopting distutils, so that looks likely and we're basically planning on it. Adding this as an enhancement to setuptools is going to be a better approach than adding it to distutils in my opinion.

[issue8987] Distutils doesn't quote Windows command lines properly

2018-11-18 Thread Mark Lawrence
Change by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue8987] Distutils doesn't quote Windows command lines properly

2018-11-18 Thread Eric Wieser
Eric Wieser added the comment: > then we should perhaps instead consider the rewrite for 3.6: provide a *new* > distutils function that does use Popen and does things "right" (based on > everything we've learned since distutils was written), leaving the old > function in place, deprecated,

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-23 Thread Jason R. Coombs
Jason R. Coombs added the comment: I'm not upset by the idea of monkey patching in Setuptools for vetting certain techniques. I've even considered having Setuptools adopt distutils entirely. Today I filed https://bitbucket.org/pypa/setuptools/issues/417/adopt-distutils to seed the discussion

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-23 Thread Steve Dower
Steve Dower added the comment: I notice you say adopt rather than vendor - effectively removing distutils from the stdlib? It could work, but to really be able to move distutils forward we need some sort of side-by-side versioning, such that a package can declare which version of distutils

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-21 Thread Chris Hogan
Chris Hogan added the comment: Here's a change that might fix the trailing backslash problem for now without breaking anything. libpath-fix.patch only affects arguments that we know are paths. This happens before anything is quoted. This avoids the problem when something like 'C:\path with

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread R. David Murray
R. David Murray added the comment: Well, it sounds like there may be no way around the fact that people may already be doing the extra needed quoting escaping internal quotes) and therefore that this change would break those use cases. (I note that any such code must be conditional on

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread R. David Murray
R. David Murray added the comment: *I'm* not suggesting using Popen. That would be a more significant change to the code, and I don't see a motivation for it. I'm just suggesting using list2cmdline for the quoting. (If we were rewriting distutils it would be a different story, but we're

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread Steve Dower
Steve Dower added the comment: Maybe a better starting point is to monkey-patch via setuptools? I know it's nasty, but it'll give us a chance to actually iterate on this before committing to a distutils change. (IMO the biggest problem with distutils is that it gets basically no testing

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread Chris Hogan
Chris Hogan added the comment: Since issue 8972 has been resolved by fixing the broken behavior, I think we should just use list2cmdline. We could leave _nt_quote_args alone and replace the call to it in _spawn_nt with: cmd = [list2cmdline([arg]) for arg in cmd] I verified that this

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread Steve Dower
Steve Dower added the comment: 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

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-20 Thread Steve Dower
Steve Dower added the comment: FWIW, the problem in the original post is that '-DMODULE_VERSION=1.0.5' is not quoted by distutils and the quotes are eaten. This can be fixed by specifying '-DMODULE_VERSION=\1.0.5\'. There are no spaces in the argument, so the problem is that cl.exe eats

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-19 Thread R. David Murray
R. David Murray added the comment: So I think the only objection to committing this as a bug fix would be the unfortunately real possibility that doing so will break someone's workaround. My *guess* is that such a workaround would most likely take the form of replacing _nt_quote_args as the

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-19 Thread Steve Dower
Steve Dower added the comment: Switching distutils.spawn to simply use subprocess.Popen (probably keeping the explicit path search) looks good to me. Quoting rules are different when you call with shell=True (aka cmd.exe /c), since then you also need to escape ^, | and (with a ^), but if

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-19 Thread R. David Murray
R. David Murray added the comment: There are two features of this I have questions about. If I'm understanding correctly, if passed a quoted string you are not re-quoting it, but you are always stripping a trailing slash even if it is inside quotes. For the first, that seems wrong. Either

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-19 Thread Mark Lawrence
Mark Lawrence added the comment: As far as I'm concerned distutils on Windows is a farce so do what you like with it. It usually can't pick up the version of VS that you know is correct and is installed, the error messages are less than useless, so the only damage that I see is something

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-18 Thread Chris Hogan
Changes by Chris Hogan christopher.ho...@intel.com: Added file: http://bugs.python.org/file40205/quote-args-ext.tar.gz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-18 Thread Chris Hogan
Chris Hogan added the comment: At Intel, we've run into problems with external modules giving paths to _nt_quote_args that contain trailing backslashes, which escapes the final quote and breaks the command. This fix takes care of special characters, trailing backslashes, and embedded quotes

[issue8987] Distutils doesn't quote Windows command lines properly

2015-08-18 Thread Zachary Ware
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +zach.ware ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___ ___ Python-bugs-list

[issue8987] Distutils doesn't quote Windows command lines properly

2014-03-19 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- versions: +Python 2.7, Python 3.4, Python 3.5 -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___

[issue8987] Distutils doesn't quote Windows command lines properly

2014-03-19 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- Removed message: http://bugs.python.org/msg107751 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___

[issue8987] Distutils doesn't quote Windows command lines properly

2014-03-19 Thread Éric Araujo
Éric Araujo added the comment: I’m more inclined to use the proposed patch rather than list2cmdline, given the issue linked. I would not like a fix for this to break people’s setup.py scripts; it would be good to know if people work around this bug by monkey-patching the _nt_quote_args

[issue8987] Distutils doesn't quote Windows command lines properly

2010-06-13 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Note that list2cmdline does correct quoting (which includes the s) if you are passing the string directly to a program. In that case cmd.exe's metacharacters aren't special. (As I noted in issue 8972, I believe that list2cmdline's

[issue8987] Distutils doesn't quote Windows command lines properly

2010-06-12 Thread Matt Giuca
New submission from Matt Giuca matt.gi...@gmail.com: I discovered this investigating a bug report that python-cjson doesn't compile properly on Windows (http://pypi.python.org/pypi/python-cjson). Cjson's setup.py asks distutils to compile with the flag '-DMODULE_VERSION=1.0.5', but

[issue8987] Distutils doesn't quote Windows command lines properly

2010-06-12 Thread Matt Giuca
Changes by Matt Giuca matt.gi...@gmail.com: -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8987 ___ ___ Python-bugs-list