Skip to content
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

unnecessary leading '\n' from Py_GetCompiler() when build with different complier #87444

Closed
josephsmeng mannequin opened this issue Feb 20, 2021 · 4 comments
Closed

unnecessary leading '\n' from Py_GetCompiler() when build with different complier #87444

josephsmeng mannequin opened this issue Feb 20, 2021 · 4 comments
Labels
topic-C-API type-bug An unexpected behavior, bug, or error

Comments

@josephsmeng
Copy link
Mannequin

josephsmeng mannequin commented Feb 20, 2021

BPO 43278
Nosy @benjaminp, @josephsmeng, @miss-islington, @shihai1991
PRs
  • bpo-43278: remove unnecessary leading '\n' from COMPILER info #24599
  • closes bpo-43278: remove unnecessary leading '\n' from COMPILER when build with GCC/Clang #24606
  • Files
  • explorer_lN3ARB7gnj.png
  • 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:

    assignee = None
    closed_at = <Date 2021-02-26.04:24:28.135>
    created_at = <Date 2021-02-20.17:02:21.528>
    labels = ['expert-C-API', 'type-bug']
    title = "unnecessary leading '\\n'  from Py_GetCompiler() when build with different complier"
    updated_at = <Date 2021-02-26.04:24:28.134>
    user = 'https://github.com/josephsmeng'

    bugs.python.org fields:

    activity = <Date 2021-02-26.04:24:28.134>
    actor = 'miss-islington'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-02-26.04:24:28.135>
    closer = 'miss-islington'
    components = ['C API']
    creation = <Date 2021-02-20.17:02:21.528>
    creator = 'josephsmeng'
    dependencies = []
    files = ['49824']
    hgrepos = []
    issue_num = 43278
    keywords = ['patch']
    message_count = 4.0
    messages = ['387417', '387462', '387466', '387707']
    nosy_count = 4.0
    nosy_names = ['benjamin.peterson', 'josephsmeng', 'miss-islington', 'shihai1991']
    pr_nums = ['24599', '24606']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue43278'
    versions = []

    @josephsmeng
    Copy link
    Mannequin Author

    josephsmeng mannequin commented Feb 20, 2021

    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.

    @josephsmeng josephsmeng mannequin added topic-C-API type-bug An unexpected behavior, bug, or error labels Feb 20, 2021
    @josephsmeng josephsmeng mannequin changed the title Inconsistent behavior of Py_GetCompiler() unnecessary leading '\n' from Py_GetCompiler() when build with different complier Feb 21, 2021
    @josephsmeng josephsmeng mannequin changed the title Inconsistent behavior of Py_GetCompiler() unnecessary leading '\n' from Py_GetCompiler() when build with different complier Feb 21, 2021
    @shihai1991
    Copy link
    Member

    Maybe Guido can give you some answers.

    Related commit: f26cda6.

    @josephsmeng
    Copy link
    Mannequin Author

    josephsmeng mannequin commented Feb 21, 2021

    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.

    @miss-islington
    Copy link
    Contributor

    New changeset 28a30bc by Joseph Shen in branch 'master':
    closes bpo-43278: remove unnecessary leading '\n' from COMPILER when build with GCC/Clang (GH-24606)
    28a30bc

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    topic-C-API type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants