This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: unnecessary leading '\n' from Py_GetCompiler() when build with different complier
Type: behavior Stage: resolved
Components: C API Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: benjamin.peterson, josephsmeng, miss-islington, shihai1991
Priority: normal Keywords: patch

Created on 2021-02-20 17:02 by josephsmeng, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
explorer_lN3ARB7gnj.png josephsmeng, 2021-02-20 17:02
Pull Requests
URL Status Linked Edit
PR 24599 closed josephsmeng, 2021-02-20 17:02
PR 24606 merged josephsmeng, 2021-02-21 07:39
Messages (4)
msg387417 - (view) Author: Joseph Shen (josephsmeng) * Date: 2021-02-20 17:02
The function Py_GetCompiler() return the version info with a leading '\n' when build with GCC/clang, while without this on other compilers. This inconsistent make the REPL print the 'welcome message' quit different, which I think is not we expect.
From the snapshot images, we can see, when compiler with MSVC, the 'welcome message' has two lines, but with GCC it is 3 lines, which two lines is what expected.
Patch is given in the github rp, thanks for review.
msg387462 - (view) Author: Hai Shi (shihai1991) * (Python triager) Date: 2021-02-21 15:52
Maybe Guido can give you some answers.

Related commit: https://github.com/python/cpython/commit/f26cda62b68b68c07666f2f21b1f16ded03afa37.
msg387466 - (view) Author: Joseph Shen (josephsmeng) * Date: 2021-02-21 16:19
Right now there is no need to keep this limits, and the __version__ info from GCC is quite simple. Pls the attached snapshot image. 
Therefor I don't think we should keep a commit from 2000.
msg387707 - (view) Author: miss-islington (miss-islington) Date: 2021-02-26 04:24
New changeset 28a30bc2e2d5a02d42e65ff7b7c6968fa966279d by Joseph Shen in branch 'master':
closes bpo-43278: remove unnecessary leading '\n' from COMPILER when build with GCC/Clang (GH-24606)
https://github.com/python/cpython/commit/28a30bc2e2d5a02d42e65ff7b7c6968fa966279d
History
Date User Action Args
2022-04-11 14:59:41adminsetgithub: 87444
2021-02-26 04:24:28miss-islingtonsetstatus: open -> closed

nosy: + miss-islington
messages: + msg387707

resolution: fixed
stage: patch review -> resolved
2021-02-26 03:21:08josephsmengsetnosy: + benjamin.peterson
2021-02-22 04:44:04gvanrossumsetnosy: - gvanrossum
2021-02-21 16:19:24josephsmengsetmessages: + msg387466
2021-02-21 15:52:14shihai1991setnosy: + shihai1991, gvanrossum
messages: + msg387462
2021-02-21 07:41:00josephsmengsettitle: Inconsistent behavior of Py_GetCompiler() -> unnecessary leading '\n' from Py_GetCompiler() when build with different complier
2021-02-21 07:39:06josephsmengsetkeywords: + patch
stage: patch review
pull_requests: + pull_request23384
2021-02-20 17:02:21josephsmengcreate