| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,8 +41,10 @@ def test_usage(self): | |||
| 41 | 41 | ||
| 42 | 42 | def test_version(self): | |
| 43 | 43 | version = ('Python %d.%d' % sys.version_info[:2]).encode("ascii") | |
| 44 | - rc, out, err = assert_python_ok('-V') | ||
| 45 | - self.assertTrue(err.startswith(version)) | ||
| 44 | + for switch in '-V', '--version': | ||
| 45 | + rc, out, err = assert_python_ok(switch) | ||
| 46 | + self.assertFalse(err.startswith(version)) | ||
| 47 | + self.assertTrue(out.startswith(version)) | ||
| 46 | 48 | ||
| 47 | 49 | def test_verbose(self): | |
| 48 | 50 | # -v causes imports to write to stderr. If the write to | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,6 +10,9 @@ What's New in Python 3.4.0 Alpha 1? | |||
| 10 | 10 | Core and Builtins | |
| 11 | 11 | ----------------- | |
| 12 | 12 | ||
| 13 | + - Issue #18338: `python --version` now prints version string to stdout, and | ||
| 14 | + not to stderr. Patch by Berker Peksag and Michael Dickens. | ||
| 15 | + | ||
| 13 | 16 | - Issue #18426: Fix NULL pointer dereference in C extension import when | |
| 14 | 17 | PyModule_GetDef() returns an error. | |
| 15 | 18 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -500,7 +500,7 @@ Py_Main(int argc, wchar_t **argv) | |||
| 500 | 500 | return usage(0, argv[0]); | |
| 501 | 501 | ||
| 502 | 502 | if (version) { | |
| 503 | - fprintf(stderr, "Python %s\n", PY_VERSION); | ||
| 503 | + printf("Python %s\n", PY_VERSION); | ||
| 504 | 504 | return 0; | |
| 505 | 505 | } | |
| 506 | 506 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments