[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-20 Thread Stefan Krah
Stefan Krah added the comment: The trustworthy buildbots look good, so I'm closing this. -- keywords: -needs review, patch resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-19 Thread Narnie Harshoe
Narnie Harshoe added the comment: David, working as fast at learning Python as I can and loving it! Stefan, thanks for the patches. Thanks guys, Narnie -- versions: -Python 3.2 ___ Python tracker ___

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-19 Thread Stefan Krah
Stefan Krah added the comment: David, thanks for all the comments! - The string/bytes issue was caused by the fact that p.stdout is only opened in text mode when universal_newlines=True. Committed fix in r82971, r82972, r82973 and r82974. I'll close this issue if all buildbots are ok. --

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-19 Thread R. David Murray
R. David Murray added the comment: Hmm. I didn't intentionally remove the older patch, but it's probably not worth the effort to restore it. -- ___ Python tracker ___ _

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-19 Thread R. David Murray
R. David Murray added the comment: Stefan: patch looks good to me in principle, but it looks like you made it against 2.7, and we commit to py3k first now. The test does not work correctly on py3k because of a bytes/string issue, but I'm not clear on why the problem happens (I haven't looked

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-19 Thread R. David Murray
Changes by R. David Murray : Removed file: http://bugs.python.org/file18016/issue9265.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-18 Thread Narnie Harshoe
Narnie Harshoe added the comment: I'm sorry, but the last lines in the interpreter reflect my code changes which seemed to not be sufficient, but it shows that just for this case at least, it corrects it and allows it to be run in /bin/bash shells (much of my shell code is bash since I'm linu

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-18 Thread Narnie Harshoe
Narnie Harshoe added the comment: Hello, I am impressed by the activity here. I am a new programmer and cutting my teeth with python. I wish I knew how to do a patch and write unit tests, but I'm just not there yet. I can show a test case in this fashion where it fails. First I prove that /

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-16 Thread Stefan Krah
Stefan Krah added the comment: Ok, here's a more comprehensive test. Comments: 1) Instead of emulating 'which' one could use find_executable from distutils.spawn. But this feels wrong. 2) Skip the test if the primary issue cannot be tested. 3) Exercise the test for /bin/sh, if it i

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-15 Thread R. David Murray
R. David Murray added the comment: Ah, I misread the test the first time. Well, I'd prefer a test that always did a real test on posix, but I suppose this has to be good enough since there could be systems that Python otherwise supports that *only* have /bin/sh. Actually I suppose one could

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-15 Thread Stefan Krah
Stefan Krah added the comment: Hm, /bin/sh should actually be removed from the list. It might be a symlink to csh, for example. I know this isn't an exhaustive test. If /bin/bash or /bin/ksh don't exist, the test is skipped. I thought this is good enough, since the majority of systems have one

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-15 Thread Éric Araujo
Éric Araujo added the comment: David: My message was ambiguous. Your second reading was correct :) Stefan: $0 works with dash too (no reason why it should not, but I still tested :). “Accepted” means “valid bug report”; to say that the patch is good people use a message or commit directly. -

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-15 Thread R. David Murray
R. David Murray added the comment: The test unfortunately is too fragile. There is no guarantee that those shells will exist with those paths on any given system. Maybe you could use 'which' to find the path to the alternate shell for use in the test, and skip it if you can't find said shel

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-15 Thread Stefan Krah
Changes by Stefan Krah : -- keywords: +patch Added file: http://bugs.python.org/file18016/issue9265.patch ___ Python tracker ___ ___ Py

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-15 Thread Stefan Krah
Stefan Krah added the comment: Here's a patch with a test case. Without the fix in subprocess.py, the test prints: == FAIL: test_specific_shell (__main__.POSIXProcessTestCase) ---

[issue9265] Incorrect name passed as arg[0] when shell=True and executable specified

2010-07-15 Thread R. David Murray
R. David Murray added the comment: Stephan: that might be a cleaner API, rather than overloading the semantics of 'executable'. But that would be a separate feature request. I see what you are saying about "just the name". I misread Éric's message as saying he'd confirmed the bug, but I gue