-
-
Notifications
You must be signed in to change notification settings - Fork 31.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
python --version should send output to STDOUT #62538
Comments
C.f. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603851 When user is calling program with options, it is not an error
The output is now sent to stderr. Please change to send to stdout as version=$(python --version) |
Your proposal is reasonable. I'm flagging it for Python 3.4+ as it's a backward incompatible modification. |
Agree. |
Here is a patch with an updated test. The -v flag also sends the output to stderr. Should that be fixed too? See Modules/main.c:678 and Lib/test/test_cmd_line.py:l47 |
LGTM. |
On 3 July 2013 15:16, Berker Peksag <report@bugs.python.org> wrote:
|
No, I think that On 3 July 2013 16:06, Serhiy Storchaka <report@bugs.python.org> wrote:
|
Simply replced printout from stderr to stdout. |
Patch for bpo-18338. Changes output for --version and updates unit test accordingly. |
New changeset e6384b8b2325 by Serhiy Storchaka in branch 'default': |
New changeset 587bdb940524 by Eli Bendersky in branch 'default': |
Is there a workaround for python2? The issue is that autotools is checking that installed tools support --help and --version and it expects those to stdout: bad=0; pid=$$; list="gtkdoc-check gtkdoc-depscan gtkdoc-fixxref gtkdoc-mkdb gtkdoc-mkhtml gtkdoc-mkhtml2 gtkdoc-mkman gtkdoc-mkpdf gtkdoc-rebase gtkdoc-scan gtkdoc-scangobj gtkdocize"; for p in $list; do \
case ' ' in \
*" $p "* | *" ../../$p "*) continue;; \
esac; \
f=`echo "$p" | sed 's,^.*/,,;s,x,x,'`; \
for opt in --help --version; do \
if "/home/ensonic/projects/gnome/gtk-doc/gtk-doc-1.27.1/_inst/bin/$f" $opt >c${pid}_.out \
2>c${pid}_.err </dev/null \
&& test -n "`cat c${pid}_.out`" \
&& test -z "`cat c${pid}_.err`"; then :; \
else echo "$f does not support $opt" 1>&2; bad=1; fi; \
done; \
done; rm -f c${pid}_.???; exit $bad
gtkdoc-check does not support --version
gtkdoc-fixxref does not support --version
gtkdoc-mkdb does not support --version
gtkdoc-mkhtml does not support --version
gtkdoc-mkhtml2 does not support --version
gtkdoc-mkman does not support --version
gtkdoc-mkpdf does not support --version
gtkdoc-rebase does not support --version
gtkdoc-scan does not support --version
gtkdoc-scangobj does not support --version
Makefile:637: recipe for target 'installcheck-binSCRIPTS' failed |
Sorry need to find the ticket for argparse .. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: