classification
Title: python --version should send output to STDOUT
Type: behavior Stage: resolved
Components: Interpreter Core Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: Matthew.Byrne, Michael Dickens, Ramchandra Apte, berker.peksag, christian.heimes, jaalto, python-dev, serhiy.storchaka
Priority: normal Keywords: easy, patch

Created on 2013-07-01 11:01 by jaalto, last changed 2013-09-06 13:56 by python-dev. This issue is now closed.

Files
File name Uploaded Description Edit
issue18338.diff berker.peksag, 2013-07-03 09:46 review
issue18338.diff Matthew.Byrne, 2013-07-08 01:37 Patch for issue 18338 review
issue18338.diff Michael Dickens, 2013-07-09 23:29 review
Messages (11)
msg192119 - (view) Author: Jari Aalto (jaalto) Date: 2013-07-01 11:01
C.f. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=603851

When user is calling program with options, it is not an error
condition to run:

	python --version

The output is now sent to stderr. Please change to send to stdout as
in other *nix utilities, in order to collect in shell scrips:

   version=$(python --version)
msg192122 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-01 11:22
Your proposal is reasonable. I'm flagging it for Python 3.4+ as it's a backward incompatible modification.
msg192198 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2013-07-02 14:24
> Your proposal is reasonable. I'm flagging it for Python 3.4+ as it's a backward incompatible modification.

Agree.
msg192225 - (view) Author: Berker Peksag (berker.peksag) * (Python committer) Date: 2013-07-03 09:46
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
msg192228 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2013-07-03 10:36
LGTM.
msg192269 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2013-07-04 04:29
On 3 July 2013 15:16, Berker Peksag <report@bugs.python.org> wrote:

>
> Berker Peksag added the comment:
>
> 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
>
> ----------
> keywords: +patch
> nosy: +berker.peksag
> stage: needs patch -> patch review
> Added file: http://bugs.python.org/file30756/issue18338.diff
>
> No, -v is for debugging purposes and should go to stderr IMO.
msg192270 - (view) Author: Ramchandra Apte (Ramchandra Apte) * Date: 2013-07-04 04:30
No, I think that

On 3 July 2013 16:06, Serhiy Storchaka <report@bugs.python.org> wrote:

>
> Serhiy Storchaka added the comment:
>
> LGTM.
>
> ----------
> nosy: +serhiy.storchaka
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue18338>
> _______________________________________
>
msg192605 - (view) Author: Matthew Byrne (Matthew.Byrne) Date: 2013-07-08 01:37
Simply replced printout from stderr to stdout.
msg192784 - (view) Author: Michael Dickens (Michael Dickens) Date: 2013-07-09 23:29
Patch for issue 18338. Changes output for --version and updates unit test accordingly.
msg192881 - (view) Author: Roundup Robot (python-dev) Date: 2013-07-11 17:01
New changeset e6384b8b2325 by Serhiy Storchaka in branch 'default':
Issue #18338: `python --version` now prints version string to stdout, and
http://hg.python.org/cpython/rev/e6384b8b2325
msg197071 - (view) Author: Roundup Robot (python-dev) Date: 2013-09-06 13:56
New changeset 587bdb940524 by Eli Bendersky in branch 'default':
Update whatsnew/3.4 wrt. --version going to stdout. #18338, #18920, #18922
http://hg.python.org/cpython/rev/587bdb940524
History
Date User Action Args
2013-09-06 13:56:38python-devsetmessages: + msg197071
2013-07-11 17:03:27serhiy.storchakasetstatus: open -> closed
assignee: serhiy.storchaka
resolution: fixed
stage: patch review -> resolved
2013-07-11 17:01:56python-devsetnosy: + python-dev
messages: + msg192881
2013-07-09 23:29:23Michael Dickenssetfiles: + issue18338.diff
nosy: + Michael Dickens
messages: + msg192784

2013-07-08 01:37:54Matthew.Byrnesetfiles: + issue18338.diff
nosy: + Matthew.Byrne
messages: + msg192605

2013-07-04 04:30:25Ramchandra Aptesetmessages: + msg192270
2013-07-04 04:29:41Ramchandra Aptesetmessages: + msg192269
2013-07-03 10:36:58serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg192228
2013-07-03 09:46:24berker.peksagsetfiles: + issue18338.diff

nosy: + berker.peksag
messages: + msg192225

keywords: + patch
stage: needs patch -> patch review
2013-07-02 14:24:29Ramchandra Aptesetnosy: + Ramchandra Apte
messages: + msg192198
2013-07-02 00:03:25hayposetkeywords: + easy
2013-07-02 00:01:06hayposettitle: option --version should send output to STDOUT -> python --version should send output to STDOUT
2013-07-01 11:22:55christian.heimessetversions: + Python 3.4, - Python 2.7
nosy: + christian.heimes

messages: + msg192122

type: behavior
stage: needs patch
2013-07-01 11:01:27jaaltocreate