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

distutils.util.grok_environment_error loses the error message #63532

Closed
mgedmin mannequin opened this issue Oct 21, 2013 · 2 comments
Closed

distutils.util.grok_environment_error loses the error message #63532

mgedmin mannequin opened this issue Oct 21, 2013 · 2 comments
Assignees
Labels
stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error

Comments

@mgedmin
Copy link
Mannequin

mgedmin mannequin commented Oct 21, 2013

BPO 19333
Nosy @mgedmin, @tarekziade, @merwok, @takluyver
Superseder
  • bpo-4931: distutils does not show any error msg when can't build C module extensions due to a missing C compiler
  • 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 = 'https://github.com/merwok'
    closed_at = <Date 2014-03-07.22:52:27.029>
    created_at = <Date 2013-10-21.14:05:17.012>
    labels = ['type-bug', 'library']
    title = 'distutils.util.grok_environment_error loses the error message'
    updated_at = <Date 2014-03-07.22:52:27.028>
    user = 'https://github.com/mgedmin'

    bugs.python.org fields:

    activity = <Date 2014-03-07.22:52:27.028>
    actor = 'eric.araujo'
    assignee = 'eric.araujo'
    closed = True
    closed_date = <Date 2014-03-07.22:52:27.029>
    closer = 'eric.araujo'
    components = ['Distutils']
    creation = <Date 2013-10-21.14:05:17.012>
    creator = 'mgedmin'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 19333
    keywords = []
    message_count = 2.0
    messages = ['200785', '212908']
    nosy_count = 4.0
    nosy_names = ['mgedmin', 'tarek', 'eric.araujo', 'takluyver']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = 'resolved'
    status = 'closed'
    superseder = '4931'
    type = 'behavior'
    url = 'https://bugs.python.org/issue19333'
    versions = ['Python 2.7', 'Python 3.3']

    @mgedmin
    Copy link
    Mannequin Author

    mgedmin mannequin commented Oct 21, 2013

    Steps to reproduce:

    $ python -c 'from distutils.util import grok_environment_error as e; print(e(IOError("message")))'

    What I expect to see:
    error: message

    What I get instead:
    error: None

    This is a problem because it hides the error message in a real-life use case: trying to use the latest setuptools in an ancient virtualenv (see [1]). TL;DR version:

    • sysconfig (in the standard library) raises IOError(msg),
    • which is then caught and passed throughdistutils.util.grok_environment_error(),
    • which then returns an unfriendly 'error: None'.

    [1] https://bitbucket.org/pypa/setuptools/issue/89/easy_install-quits-with-error-none-in

    @mgedmin mgedmin mannequin assigned merwok Oct 21, 2013
    @mgedmin mgedmin mannequin added stdlib Python modules in the Lib dir type-bug An unexpected behavior, bug, or error labels Oct 21, 2013
    @takluyver
    Copy link
    Mannequin

    takluyver mannequin commented Mar 7, 2014

    Duplicate of bpo-4931. This function should be entirely unnecessary now.

    @merwok merwok closed this as completed Mar 7, 2014
    @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
    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