[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c76f1d78ff78 by Michael Foord in branch 'default': Closes issue 16064. No longer hard code executable name in unittest help output. http://hg.python.org/cpython/rev/c76f1d78ff78 -- nosy: +python-dev resolution: -> fixed stage: patch review

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-28 Thread Arnav Khare
Arnav Khare added the comment: Added comment explaining why we alter the executable string. -- nosy: +Arnav.Khare Added file: http://bugs.python.org/file27334/arnav.unittest.argv0.1.diff ___ Python tracker

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-28 Thread Larry Hastings
Larry Hastings added the comment: Michael, you're the one who came up with the feature. If you write the comment I'll fold it into the patch. -- ___ Python tracker ___

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-28 Thread Michael Foord
Michael Foord added the comment: Yes it is for nicer help output, and a comment in the code is certainly warranted. -- ___ Python tracker ___ ___

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: (I was just including the line for the convenience of anyone that might happen to come across the issue. It was not to inform you of course! :) ) FWIW, if you already know from talking to Michael or looking at the code, I think a comment saying why sys.argv[0

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-28 Thread Larry Hastings
Larry Hastings added the comment: Certainly. But what is the right thing to do? I talked to Michael about it in person this morning, and our consensus was: use basename of sys.executable. Patch attached. -- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.p

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-28 Thread Chris Jerdonek
Chris Jerdonek added the comment: It looks like the offending line is here: http://hg.python.org/cpython/file/6ccb04c4cbae/Lib/unittest/__main__.py#l5 if sys.argv[0].endswith("__main__.py"): sys.argv[0] = "python -m unittest" -- nosy: +chris.jerdonek __

[issue16064] unittest -m claims executable is "python", not "python3"

2012-09-27 Thread Larry Hastings
New submission from Larry Hastings: I wrote the following script called "bonkers.py": -- import sys print(sys.argv[0]) -- then ran % python3 -m unittest bonkers It printed -- ['python -m unittest', 'bonkers'] -- Shouldn't it say "python3", not "python"? Maybe it should use sys