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

test.pythoninfo prints a stack trace and exits with 1 when the compiler does not exist #80133

Closed
xdegaye mannequin opened this issue Feb 9, 2019 · 5 comments
Closed
Labels
3.7 (EOL) end of life 3.8 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented Feb 9, 2019

BPO 35952
Nosy @vstinner, @xdegaye
PRs
  • bpo-35952: Fix pythoninfo when the compiler is missing #13007
  • [3.7] bpo-35952: Sync test.pythoninfo from master #13009
  • [2.7] bpo-35952: Sync test.pythoninfo from master #13010
  • Files
  • pythoninfo_api_24.txt
  • 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 2019-04-29.13:21:29.442>
    created_at = <Date 2019-02-09.21:06:05.137>
    labels = ['3.7', '3.8', 'type-bug', 'library']
    title = 'test.pythoninfo prints a stack trace and exits with 1 when the compiler does not exist'
    updated_at = <Date 2019-04-29.13:21:29.433>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2019-04-29.13:21:29.433>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-04-29.13:21:29.442>
    closer = 'vstinner'
    components = ['Library (Lib)']
    creation = <Date 2019-02-09.21:06:05.137>
    creator = 'xdegaye'
    dependencies = []
    files = ['48290']
    hgrepos = []
    issue_num = 35952
    keywords = ['patch']
    message_count = 5.0
    messages = ['335139', '341068', '341074', '341077', '341078']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'xdegaye']
    pr_nums = ['13007', '13009', '13010']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue35952'
    versions = ['Python 2.7', 'Python 3.7', 'Python 3.8']

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Feb 9, 2019

    The call to subprocess.Popen() in collect_cc() of Lib/test/pythoninfo.py raises an exception when the compiler that has been used to build python is not present on the host running python. In that case pythoninfo prints a stack trace and exits with an error.

    On the other side if the execution of the compiler to get its version fails, the error is silently ignored. It seems the exception should be ignored as well.

    @xdegaye xdegaye mannequin added 3.8 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Feb 9, 2019
    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Apr 29, 2019

    Attached pythoninfo_api_24.txt, the output of pythoninfo for Android API 24 with PR 13007.

    @vstinner
    Copy link
    Member

    New changeset a86e064 by Victor Stinner (xdegaye) in branch 'master':
    bpo-35952: Fix test.pythoninfo when the compiler is missing (GH-13007)
    a86e064

    @vstinner
    Copy link
    Member

    New changeset 5e09a99 by Victor Stinner in branch '3.7':
    bpo-35952: Sync test.pythoninfo from master (GH-13009)
    5e09a99

    @vstinner
    Copy link
    Member

    New changeset be6cbfb by Victor Stinner in branch '2.7':
    bpo-35952: Sync test.pythoninfo from master (GH-13010)
    be6cbfb

    @vstinner vstinner added the 3.7 (EOL) end of life label Apr 29, 2019
    @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
    3.7 (EOL) end of life 3.8 only security fixes stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant